Skip to content
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

[RFC] Drop Python 2 support #410

Closed
lazka opened this issue Oct 23, 2019 · 10 comments
Closed

[RFC] Drop Python 2 support #410

lazka opened this issue Oct 23, 2019 · 10 comments

Comments

@lazka
Copy link
Member

@lazka lazka commented Oct 23, 2019

I haven't put much thought into it yet, but we should have some plan for when to drop support.

https://pypistats.org/packages/mutagen

Looking at the weekend drop off looks like Python 2 is mostly used in company environments.

Are there any major users of mutagen which haven't been ported yet?

@phw any blockers you know of?

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 23, 2019

If we drop support I'll try to backport bugfixes to the last Python 2 supporting release if requested.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 23, 2019

@hugovk thanks for pypistats!

I'm wondering if it would be possible to also show the pip version used? We can easily drop Python 2 support without breaking things for users by setting python_requires, but that's only respected by pip >= 9.0, so for users of older pip versions dropping Python 2 support will break their install.

I assume that would also be helpful for other maintainers considering dropping Python 2 support.

@hugovk

This comment has been minimized.

Copy link

@hugovk hugovk commented Oct 23, 2019

You're welcome!

You can't see pip version with pypistats, but you can probably get it via the PyPI stats on BigQuery.

pypinfo is a good way, perhaps something like pypinfo mutagen installer-version will do it. (I'm out of free quota right now.) https://github.com/ofek/pypinfo/

pip 9 is now 3 years old. Many projects I've seen aren't too worried about old pip, but if it's a concern (and good to find stats first), https://python3statement.org/practicalities/ has some tips like printing an error in setup.py for Python 2.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 23, 2019

ok, thanks, I'll try that.

ubuntu 16.04 still has pip 8.1.1, which is what I'm worried about.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 23, 2019

puh, using bigquery used to be easier...

> pypinfo --all -l 30 mutagen installer installer-version
| installer_name | installer_version | download_count |
| -------------- | ----------------- | -------------- |
| pip            | 18.1              |         33,181 |
| pip            | 9.0.1             |         14,106 |
| pip            | 19.2.3            |         13,957 |
| pip            | 19.0.3            |          6,590 |
| None           | None              |          3,079 |
| pip            | 19.3              |          2,871 |
| pip            | 19.3.1            |          2,231 |
| pip            | 19.1.1            |          1,609 |
| bandersnatch   | 3.6.0             |            894 |
| pip            | 9.0.3             |            649 |
| pip            | 19.2.2            |            626 |
| pip            | 10.0.1            |            554 |
| Browser        | None              |            514 |
| pip            | 8.1.1             |            279 |
| pip            | 19.2.1            |            258 |
| pip            | 18.0              |            199 |
| setuptools     | 41.4.0            |            168 |
| bandersnatch   | 2.0.0             |            165 |
| pip            | 9.0.2             |            163 |
| setuptools     | 41.2.0            |            155 |
| setuptools     | 28.8.0            |            145 |
| bandersnatch   | 3.4.1             |            130 |
| bandersnatch   | 3.5.0             |            123 |
| pip            | 19.1              |            111 |
| setuptools     | 40.8.0            |            111 |
| pip            | 1.5.4             |            111 |
| setuptools     | 39.0.1            |            101 |
| pip            | 19.0.1            |             96 |
| setuptools     | 41.0.1            |             78 |
| pip            | 7.1.2             |             75 |
| Total          |                   |         83,329 |

so, assuming the data is correct, this would only break 0.5% of all installs, which seems fine to me.

@phw

This comment has been minimized.

Copy link
Contributor

@phw phw commented Oct 23, 2019

From my point of view it would be fine to drop support. The existing versions would still be around, so users of Python 2 have a way to handle that. Some thoughts on the process:

  1. This probably would warrant a version change to 2.0
  2. I personally would probably do a last release 1.43 with changes currently lined up, in this release announce Python 2 support as deprecated and afterwards remove Python 2 support from the sources
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 24, 2019

re (1), we are not breaking API, so that would be confusing to Python 3 users imo, and py 2 users can't install it, so no API break there too. re (2), sounds good.

preliminary plan:

  • Make 1.43 release with (optional) setuptools, add python_requires, announce Python 2 drop
  • Make 1.44 release with python_requires dropping Python 2, universal wheels disabled, error out on running setup.py with py2

(edit: we need to enforce that sdist uses setuptools, otherwise a future release forgetting it would break py2 users)

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Nov 17, 2019

The 1.43.0 release now has universal wheels on pypi, requires setuptools and includes a python version requirement. So dropping Python 2 should be easy now.

lazka added a commit that referenced this issue Feb 9, 2020
See #410
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Feb 9, 2020

Done in 36de51a

@lazka lazka closed this Feb 9, 2020
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Feb 10, 2020

I made a new Python 3 only release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.