forked from benjaminp/six
-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update from benjaminp/six@master #8
Open
evandrocoan
wants to merge
55
commits into
evandroforks:master
Choose a base branch
from
benjaminp:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Small update to the `ensure_str` function's documentation formatting to match `ensure_binary` and `ensure_text`'s formatting.
Also, [remove the __sudo__ tag per recommendation of Travis](https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration).
There was `six.io` if and only if py3, which was error-prone.
We are obliged to use a very old version that supports Python 3.2.
This reverts commit d5efa74. The original intention of providing a distutils fallback has not gone away. These three extra lines will almost never be used, as most people have setuptools or install with pip anyway, and at the same time it serves as a very low-maintenance solution for people who *do* want to bootstrap setuptools. Bootstrapping setuptools without vendored six (and pyparsing) is a valid use case. Although setuptools by default ships with vendored dependencies, it supports removing the contents of the _vendored/ directory and falling back to an installed version of six.py -- and thirdparty vendors of setuptools, such as Arch Linux and OpenSUSE, actually make use of this and need to be able to bootstrap the dependency tree of setuptools itself.
- Add Python 3.8. - Unpin pypy2.7 and pypy3.
This is pretty-much a straight backport of Py3 implementations of update_wrapper and (privately) wraps. Fixes #250 Fixes #165 Co-authored-by: Benjamin Peterson <[email protected]>
Fixes #308. Stops testing them on the CI, update python_requries and remove some code specifically for those versions. Not done anything to remove any six functionality that's only a benefit on those versions, that should be in a separate PR and would be a breaking change that should ideally deprecate first.
Fixes #288. Co-authored-by: Benjamin Peterson <[email protected]>
Co-authored-by: Benjamin Peterson <[email protected]>
We found that large applications that have undergone a 2 -> 3 migration and wound up with a lot of six.ensure_str and six.ensure_binary calls could save 1-2% CPU usage by optimizing these for the common case. Further optimization could be done by replacing them with extension module implementations - assumed out of scope for the pure Python six project itself. Ideally all of these calls and use of six in people's code would be removed after there all need for any Python 2 compatibility is gone. But completing that kind of type cleanup requires a lot of human engineering time. This lowers the ongoing costs in the interim. Contributed by YouTube.
Fixes #341. Co-authored-by: Benjamin Peterson <[email protected]>
…lib.request (#388) python/cpython#84850 > Remove URLopener and FancyURLopener classes from urllib.request. > They had previously raised DeprecationWarning since Python 3.3. The test failures were: __________________ test_move_items_urllib_request[URLopener] ___________________ item_name = 'URLopener' @pytest.mark.parametrize("item_name", [item.name for item in six._urllib_request_moved_attributes]) def test_move_items_urllib_request(item_name): """Ensure that everything loads correctly.""" assert item_name in dir(six.moves.urllib.request) > getattr(six.moves.urllib.request, item_name) E AttributeError: module 'six.moves.urllib.request' has no attribute 'URLopener' test_six.py:170: AttributeError ________________ test_move_items_urllib_request[FancyURLopener] ________________ item_name = 'FancyURLopener' @pytest.mark.parametrize("item_name", [item.name for item in six._urllib_request_moved_attributes]) def test_move_items_urllib_request(item_name): """Ensure that everything loads correctly.""" assert item_name in dir(six.moves.urllib.request) > getattr(six.moves.urllib.request, item_name) E AttributeError: module 'six.moves.urllib.request' has no attribute 'FancyURLopener' test_six.py:170: AttributeError
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The upstream repository
benjaminp/six@master
has some new changes that aren't in this fork. So, here they are, ready to be merged!This Pull Request was created programmatically by the githubpullrequests.