Open notatallshaw opened 1 month ago
Paging @hugovk for the pip downloads stats. My gut reaction is that dropping support for Python 3.8 right after EOL may be a bit too painful.
From https://hugovk.github.io/pypi-tools/charts.html#pip:
PyPI downloads for the last 30 days, for all versions of pip shows 9.52% with Python 3.8:
❯ pypinfo --all --percent --markdown pip pyversion
Served from cache: False
Data processed: 5.73 GiB
Data billed: 5.73 GiB
Estimated cost: $0.03
python_version | percent | download_count |
---|---|---|
3.11 | 24.16% | 63,984,763 |
3.10 | 18.94% | 50,175,163 |
3.7 | 17.09% | 45,261,471 |
3.9 | 13.80% | 36,541,609 |
3.8 | 9.52% | 25,211,245 |
3.12 | 6.35% | 16,818,377 |
3.6 | 3.83% | 10,134,044 |
2.7 | 3.48% | 9,216,031 |
None | 2.64% | 7,004,762 |
3.13 | 0.20% | 524,934 |
Total | 264,872,399 |
Limiting to only downloads of pip==24, with the reasoning that users of pip==24 are most likely to upgrade to 24.3 and excluding those who never upgrade anyway, shows 1.35% for Python 3.8:
❯ pypinfo --all --percent --markdown pip==24 pyversion
Served from cache: False
Data processed: 7.45 GiB
Data billed: 7.45 GiB
Estimated cost: $0.04
python_version | percent | download_count |
---|---|---|
3.7 | 72.42% | 29,422,847 |
3.11 | 8.86% | 3,599,931 |
None | 6.70% | 2,721,770 |
3.9 | 4.90% | 1,991,069 |
3.10 | 3.04% | 1,237,178 |
3.12 | 2.61% | 1,059,822 |
3.8 | 1.35% | 547,122 |
2.7 | 0.11% | 44,067 |
3.13 | 0.01% | 4,304 |
3.6 | 0.01% | 2,723 |
Total | 40,630,833 |
Limiting to only downloads of pip==24
Does that mean pip versions 24.*
or pip version 24.0
?
Hmm, I thought it meant all 24.*
but it's more like 24.0. Here's numbers for each minor version:
I realize that in the case of Python 3.7, we were in favour of dropping support for it promptly, but I really don't see any worthwhile benefits from dropping 3.8 soon. It'd be nice to fix some bugs in the 24 series for 3.8 users, and then we can revisit the question closer to 25.0.
For context, I grepped all of pip's source code for references to Python 3.8 for any code that we could clean up and I only got one hit in the resolvelib glue: https://github.com/pypa/pip/blob/348c428b065aa1a685cda69aabc663b8e0a9b5e7/src/pip/_internal/resolution/resolvelib/found_candidates.py#L28-L39
Of course, starting in Python 3.9, many built-in types are now subscriptable for typing purposes. Other than that, I'm not aware of anything major we'd be gaining. Python 3.9 is indeed the real kicker as that unblocks the upgrade to urllib3's 2.x series. (And then Python 3.10 as that's the last version to use the old metadata backend.)
24.1: 0.2m
Can you please check for 24.1.2, both 24.0 and 24.2 didn't have patch releases, but 24.1 had two followup patch releases, and I'm guessing by the fact you're seeing 24.1 as 100x less downloads it's because the numbers are only for 24.1 and not 24.1.1 or 24.1.2: https://pypi.org/project/pip/#history
I realize that in the case of Python 3.7, we were in favour of dropping support for it promptly, but I really don't see any worthwhile benefits from dropping 3.8 soon. It'd be nice to fix some bugs in the 24 series for 3.8 users, and then we can revisit the question closer to 25.0.
From my point of view I think the only compelling reason to drop older versions of Python is to support any vendored packages that don't 100% support older versions of Python. And in this case I think the most important example is urllib3 2.0, which pip can not vendor until it drops Python 3.9. And the longer pip waits for Python 3.8 to be dropped the more of a shock it will be to users if Python 3.9 is dropped quickly.
I don't think there is significant technical debt in pip from supporting older 3.x versions, and if it wasn't for pip needing to vendor libraries I would consider it appropriate to support old versions of Python until the CI broke.
I think a reasonable cutoff is pip 24 is the last series to support Python 3.8. Not particularly meaningful, at least hey we can point "it's a major release, y'all happy semvar folks?!"
I'm only half-joking :)
24.1: 0.2m
Can you please check for 24.1.2, both 24.0 and 24.2 didn't have patch releases, but 24.1 had two followup patch releases, and I'm guessing by the fact you're seeing 24.1 as 100x less downloads it's because the numbers are only for 24.1 and not 24.1.1 or 24.1.2: pypi.org/project/pip#history
Yep, that sounds about right, 24.1.2 is bigger but still fairly low:
Yep, that sounds about right, 24.1.2 is bigger but still fairly low:
That's fascinating how starkly different orders of magnitude the 24.1 releases are, it really makes me wonder what dominates download numbers and how useful they actually are from a project maintenance perspective.
I think a reasonable cutoff is pip 24 is the last series to support Python 3.8. Not particularly meaningful, at least hey we can point "it's a major release, y'all happy semvar folks?!"
I'm only half-joking :)
I guess we take a look again closer to the 25.0 release? And if there isn't a truststore release and vendor before 24.3, as I mention in https://github.com/pypa/pip/issues/12941#issuecomment-2408616377, I think it would be quite helpful to some users to do one more Python 3.8 release with that new version of truststore.
For context, I grepped all of pip's source code for references to Python 3.8 for any code that we could clean up and I only got one hit in the resolvelib glue:
Yeah, I didn't see much either, but there are a lot of typing changes from Ruff/pyupgrade, something like 200 files and 1,200 lines, for example: https://github.com/pypa/pip/compare/main...hugovk:pip:rm-3.8?expand=0
Small comment from the user point of view.
There is one more benefit from dropping 3.8. It's good way to help the ecosystem to move to Python 3.9 quicker. Even if pip itself is not affected, generally moving faster to non-EOL version of Python is good for multiple reasons - including security reasons. Imagine someone finds a critical security issue in Python in March 2025 and it gets fixed only in 3.9+. People who would stil be using Python 3.8 are vulnerable, and with security, it's important to limit the damage - so the less number of people still use Python 3.8, the better.
As the default frontend used by many - pip
has a tremendous impact on the whole ecosystem, and it has a built-in "please upgrade" warning displayed prominently that in many times actually make people upgrade. Using that power to drive the ecosystem to be safer, is pretty noble and good reason to drop 3.8 in 25.* version of pip
- or even earlier if that would be accepted.
I don't think pip should be pushing users to upgrade their Python installation - that feels backwards to me. I'm happy with our current policy of dropping support for Python versions when usage (as measured by pip download figures for that version) gets low enough that we expect the impact to be minimal.
If the core Python team wants to push users to adopt newer versions faster, that's something they should do themselves.
If the core Python team wants to push users to adopt newer versions faster, that's something they should do themselves.
Sure - if that's the maintainer positions, I just thought it's worth to share that perspective where the whole ecosystem works together - I am now working with @sethmlarson on Airflow Supply Chain security improvements and reviews with the goal of making it then possible to apply to the whole PyPI ecosystem gets benefit of what we do, and recently gave a talk at Airflow Summit Keynote about it called "Security United" where together with Alpha-Omega we stressed how important it is where everyone works together on improving security, regardless if it is "our" or "their" problem, so I thought I might mention that having pip
becoming part of the effort might also be a good idea.
But if maintainers of pip
think it's "not their problem", it might well be a good decision from their side, just wanted to mention you might look at it from wider perspective.
It’s not so much a matter of not our problem, more a case that I’d want the core team to take the lead on any effort to get people to upgrade Python more aggressively.
It’s not so much a matter of not our problem, more a case that I’d want the core team to take the lead on any effort to get people to upgrade Python more aggressively.
Sure. I acknowldged your right to make that decision, provided different perspective and have shown and example where others think differently and act for the good of the whole ecosystem in principle. Just so you see this can be at least taken it into consideration when you make decisions about your project. No more, no less.
But of course it's you who decide where you spend your energy and efforts, and you have the right to do so - it's your call of course not mine. And it's not that I agree or disagree with it, it's not for me to decide, still I think it's worth knowing that others are thinking differently.
FWIW, I should also note that what the numbers look like for pip install pip --upgrade
etc isn't a particularly informative data point to be using here -- we want something akin to "downloads from PyPI, grouped by installer.version and platform, where installer.name = pip", and not "counts of downloads of pip's own wheels and sdists".
Last I checked, that was on the order of terrabytes for the query but I don't remember the timescale I was querying (point is:I couldn't do it on the free tier). It does make sense that these costs match with pypi.org's exponential growth tho.
I have a local patch that drops Python 3.8 support with pyupgrade and manual clean-up done. I haven't PRed it as it needs a bit more work, and it's going to be very merge-conflict prone so I'll wait until we decide on a timeline.
Python 3.8 support, from the Python Foundation, is ending in a few weeks: https://endoflife.date/python
This is to track ending Python 3.8 support, see 3.7 end: https://github.com/pypa/pip/issues/11934 and https://github.com/pypa/pip/pull/11944
There is motivation as pip will not be able to vendor urllib3 2 until Python 3.9 support is dropped: https://github.com/pypa/pip/issues/12857. Which contains bugfixes/features that will not be backported.
Code of Conduct