-
Notifications
You must be signed in to change notification settings - Fork 275
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
Fix for Python 4 #297
Fix for Python 4 #297
Conversation
499425d
to
036f785
Compare
I don't think this is worth worrying about unless Python 4 is actually concretely on the horizon, and people are still using six. https://bitbucket.org/gutworth/six/issues/22/variable-sixpy3-is-time-bomb |
fwiw, there's already indication that python 4 will happen: >>> from __future__ import annotations
>>> annotations
_Feature((3, 7, 0, 'beta', 1), (4, 0, 0, 'alpha', 0), 1048576) that is, why wait to fix this? |
I was just discussing with GvR this week that the annotations will probably have to move to 3.10 or 3.11. |
separately: why wait to fix this? |
I don't think there's anything to fix. |
legacy code lives for a long time, I wouldn't be surprised to see six for a long long time (especially now with the addition of the new |
Yes, but again, for this to be more than a theoretical problem, Python 4 would have to be more than theoretical. |
we know it will eventually come, why wait until it's a problem when it's easy to fix now? ~/workspace/cpython $ git grep 'deprecated-removed::.*4\.0' | wc -l
23 |
We don't know it will eventually come. That PEP 563 and deprecation notices mention it just goes to show people consider it a safely vague indefinite future event. It's always "a while off". |
that's fair -- my concern is that since |
I'm not exactly sure what the antecedents of the "it"s in this sentence are. |
|
yeah sorry that sentence was a mess :) |
We don't yet know if 3.10 or 4.0 will follow Python 3.9, but it will probably happen in 2020 when Python 3.9 reaches beta and as six is vendored and used in many codebases, it would be good for six to be ready for both.
There's several places in the codebase which essentially do:
When run on Python 4, this will run the Python 2 code!
This PR flips it around:
Thanks to @asottile for flake8-2020.
As an aside, there's a slight inconsistency here:
PY34
is true on Python 4, butPY3
is not. Would it be too big a break to change it?