Fix for Python 4: replace unsafe six.PY3 with PY2#1959
Merged
Conversation
Member
|
Perhaps this issue should be fixed in six rather than in every package on PyPI. I'm pretty sure PY3 was never meant to mean PY<4. |
Contributor
Author
|
It's a WONTFIX in six. |
|
Note, it's almost certainly going to be 3.10. That's the consensus from the Python-Dev mailing list and that's what's being used to reference the future release in PEPs and CPython. There's even references to 3.11 and 3.12 already. |
Contributor
Author
|
Thanks for the link! |
Member
Maybe this should also be added to |
2 tasks
Contributor
Author
|
Good idea, please see PR #1968. |
This file contains hidden or 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
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.
Summary of changes
We don't yet know if 3.10 or 4.0 will follow Python 3.9, but whichever it is, it will probably happen in 2020 when Python 3.9 reaches beta and work begins on Python 3.9+1.
There's some code which uses
six.PY3:Where:
When run on Python 4, this will run the Python 2 code! Instead, use
six.PY2.Found using https://github.com/asottile/flake8-2020
Pull Request Checklist