-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Dropping Python 2 support #7367
Comments
And as a side note: Python 2 support in third-party packages is being slowly phased out anyway. We dropped all Python 2-only packages that are not required by other packages (with only enum34 and ipaddress left) and we stopped supporting Python 2 in many packages where upstream stopped support for Python 2. |
The first step was to drop most Python-2-only third party packages. As a second step I suggest to drop the remaining Python-2-only packages and remove Python 2 support of third-party packages that have separate Python 2 and Python 3 versions. This affects:
This also means dropping Python 2 support for the following packages as they depend on the packages above:
Python 2 support always remains in the current version as published on PyPI, but I think not offering any updates is a reasonable compromise with lowering our maintenance effort. |
I think Python 2 support for |
We had one non-maintenance commit since the re-org more than a year ago, but two maintenance commits. types-six 1.16.10 is not going away, but the maintenance burden remains. I believe that six is nowadays often used, just because removing it from Python 3 code is effort. Edit: One of my motiviations is to get rid of |
* Remove all Python 2 only third-party distributions. * Remove Python 2 support from six as the Python 2 stubs diverged from the Python 3 stubs. * Recursively remove Python 2 support from all distributions that depend on the distributions above. Affects: * boto * cryptography * enum34 (removed) * ipaddress (removed) * paramiko * pysftp * pyvmomi * six Part of python#7367
Would it make sense to remove six altogether? Seems unlikely that six's API would change much and it feels a little weird and potentially confusing for users to have |
I have no strong feelings about six. Last release was less than a year ago, though. |
We should hopefully be getting rid of this entire subdirectory soon anyway (#7367). This will make PRs to flake8-pyi a lot easier.
We should hopefully be getting rid of this entire subdirectory soon anyway (#7367). This will make PRs to flake8-pyi a lot easier.
The next step would be to drop Python 2 support from the remaining third-party stubs. This affects:
This would ease maintenance a bit more, since we don't have to take care not to break Python 2 when updating those stubs and we could remove Python 2 support from the stub uploader. As before, the current version of the stubs will remain on PyPI indefinitely and can be used for people still using Python 2, but updates to the stubs (for Python 2) won't be possible anymore. |
I think we should keep
So it seems likely that removing |
Yes, I believe that even users that have dropped Python 2 might still use |
Doing this would also mean we could enable several flake8-pyi checks that currently don't run on third-party stubs (because some of them still support Python 2). |
|
This only leaves support for the stdlib, which we can drop after mypy drop Python 2 support (python/mypy#12237). |
I was running the mypy test suite and I discovered that I am the only one foolish enough to keep Python 2 kicking around on their system to get picked up by mypy's test suite. I ran
And all of the Python 2 tests run against typeshed failed due to an incompatibility with This seems to have broken in mypy's 0.950 release, I haven't tracked it to which commit. I know it is after this mypy typeshed sync I personally don't really think it is worth the effort to fix this, I just uninstalled Python 2, but if someone else cares enough to fix it I figured I should report it. |
It was probably this PR that broke things: The PR was made to unblock some changes over at our linter, flake8-pyi. We no longer run flake8-pyi on the Python 2 stdlib, however, so we could probably just revert that PR fairly easily. |
I'm fine with reverting, although I'd say we wait on mypy to decide whether they still want to support Python 2 in 0.960 and just remove the @python2 tree if they don't. |
Similar errors are already ignored in Python 3 stubs. The errors break Python 2 tests of mypy. See python#7367 (comment) for context.
Similar errors are already ignored in Python 3 stubs. The errors break Python 2 tests of mypy. See #7367 (comment) for context.
Mypy is now ready for us to remove support for Python 2: python/mypy#12237 (comment) Who wants to do the honours? |
As far as I'm aware, mypy is the last user of our Python 2 stubs. mypy plans to eventually drop Python 2 support, although no fixed date has been set. See python/mypy#12237 for details. Once mypy has dropped support, we can also consider dropping it. This would ease maintenance and we could simplify our release process quite a bit.
I'm opening and pinning this ticket for discussion and objections.
The text was updated successfully, but these errors were encountered: