Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Python version support #730

Open
AA-Turner opened this issue Feb 24, 2025 · 5 comments
Open

Python version support #730

AA-Turner opened this issue Feb 24, 2025 · 5 comments

Comments

@AA-Turner
Copy link
Contributor

We're probably coming to the point where even for flit_core I'll drop support for some older Python versions, but let's work that out separately. I generally find it easier to support a pretty broad range of Python versions than to deal with people getting stuck on an old version of a package I maintain because I dropped support for older Python.

Originally posted by @takluyver in #728 (comment)

Flit 3.11 supports Python 3.8+, and flit-core supports 3.6+.

Latest statistics 1 for flit-core downloads for show that 3.6 represents <0.05%, 3.7 represents <0.1%, and 3.8 <2%. 3.9 is the overwhelming majority at >50%.

For flit 2, Python 3.9 is again the overwhelming majority with >80%. The numbers are a little suspicious as 3.9 specifically skyrockets from late October/November onwards. I will try to look at a more granular level.

This probably suggests that dropping 3.6 and 3.7 for flit-core is a reasonable move, but other than that Flit should maintain support for non end-of-life Python releases.

A

@AA-Turner
Copy link
Contributor Author

Running uvx pypinfo --all --limit 1000 --markdown flit pyversion version, and filtering to only Python 3.6+ and Flit 3.7+, I get the following results. There's a clear outlier with Python 3.9 and Flit-core 3.10.1, which the second sets of table clips to 50,000.

Note that this is for the last 30 days, and Flit 3.11 was only released on the 19th.

Flit-core

Download counts

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0 4 2 18 3 5 3 3 0 38
3.7.1 0 489 19,604 499 901 69 19,799 15 0 41,376
3.8.0 1 442 953 602 2,227 8,080 761 48 0 13,114
3.9.0 6 2,432 6,185 6,290 15,845 30,465 303,682 495 4 365,404
3.10.0 0 1 4 28 54 5 72 32 0 196
3.10.1 2,389 19,651 122,668 4,415,456 943,626 617,362 1,104,001 185,074 1,698 7,411,925
3.11.0 300 2,955 23,444 572,580 170,023 182,477 99,939 60,592 837 1,113,147
Total 2,696 25,974 172,860 4,995,473 1,132,679 838,463 1,528,257 246,259 2,539 8,945,200

Download proportions

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00%
3.7.1 0.00% 0.01% 0.22% 0.01% 0.01% 0.00% 0.22% 0.00% 0.00% 0.46%
3.8.0 0.00% 0.00% 0.01% 0.01% 0.02% 0.09% 0.01% 0.00% 0.00% 0.15%
3.9.0 0.00% 0.03% 0.07% 0.07% 0.18% 0.34% 3.39% 0.01% 0.00% 4.08%
3.10.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00%
3.10.1 0.03% 0.22% 1.37% 49.36% 10.55% 6.90% 12.34% 2.07% 0.02% 82.86%
3.11.0 0.00% 0.03% 0.26% 6.40% 1.90% 2.04% 1.12% 0.68% 0.01% 12.44%
Total 0.03% 0.29% 1.93% 55.85% 12.66% 9.37% 17.08% 2.75% 0.03% 100%

Download counts (no Python 3.9 / Flit 3.10.1 outlier)

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0 4 2 18 3 5 3 3 0 38
3.7.1 0 489 19,604 499 901 69 19,799 15 0 41,376
3.8.0 1 442 953 602 2,227 8,080 761 48 0 13,114
3.9.0 6 2,432 6,185 6,290 15,845 30,465 303,682 495 4 365,404
3.10.0 0 1 4 28 54 5 72 32 0 196
3.10.1 2,389 19,651 122,668 50,000 943,626 617,362 1,104,001 185,074 1,698 3,046,469
3.11.0 300 2,955 23,444 572,580 170,023 182,477 99,939 60,592 837 1,113,147
Total 2,696 25,974 172,860 630,017 1,132,679 838,463 1,528,257 246,259 2,539 4,579,744

Download proportions (no Python 3.9 / Flit 3.10.1 outlier)

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00%
3.7.1 0.00% 0.01% 0.43% 0.01% 0.02% 0.00% 0.43% 0.00% 0.00% 0.90%
3.8.0 0.00% 0.01% 0.02% 0.01% 0.05% 0.18% 0.02% 0.00% 0.00% 0.29%
3.9.0 0.00% 0.05% 0.14% 0.14% 0.35% 0.67% 6.63% 0.01% 0.00% 7.98%
3.10.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00%
3.10.1 0.05% 0.43% 2.68% 1.09% 20.60% 13.48% 24.11% 4.04% 0.04% 66.52%
3.11.0 0.01% 0.06% 0.51% 12.50% 3.71% 3.98% 2.18% 1.32% 0.02% 24.31%
Total 0.06% 0.57% 3.77% 13.76% 24.73% 18.31% 33.37% 5.38% 0.06% 100%

Flit

Download counts

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0 0 1 5 5 5 5 1 0 22
3.7.1 9 221 19,327 300 373 20 208 15 0 20,473
3.8.0 2 40 96 40 1,571 3,013 3,137 9 0 7,908
3.9.0 216 2,842 762 938 1,967 2,026 12,127 135 0 21,013
3.10.0 0 0 1 16 24 9 13 0 0 63
3.10.1 0 1 6,047 2,773,411 122,244 74,641 26,640 10,530 100 3,013,614
3.11.0 0 0 1,770 47,344 13,526 8,204 3,312 1,927 52 76,135
Total 227 3,104 28,004 2,822,054 139,710 87,918 45,442 12,617 152 3,139,228

Download proportions

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00%
3.7.1 0.00% 0.01% 0.62% 0.01% 0.01% 0.00% 0.01% 0.00% 0.00% 0.65%
3.8.0 0.00% 0.00% 0.00% 0.00% 0.05% 0.10% 0.10% 0.00% 0.00% 0.25%
3.9.0 0.01% 0.09% 0.02% 0.03% 0.06% 0.06% 0.39% 0.00% 0.00% 0.67%
3.10.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00%
3.10.1 0.00% 0.00% 0.19% 88.35% 3.89% 2.38% 0.85% 0.34% 0.00% 96.00%
3.11.0 0.00% 0.00% 0.06% 1.51% 0.43% 0.26% 0.11% 0.06% 0.00% 2.43%
Total 0.01% 0.10% 0.89% 89.90% 4.45% 2.80% 1.45% 0.40% 0.00% 100%

Download counts (no Python 3.9 / Flit 3.10.1 outlier)

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0 0 1 5 5 5 5 1 0 22
3.7.1 9 221 19,327 300 373 20 208 15 0 20,473
3.8.0 2 40 96 40 1,571 3,013 3,137 9 0 7,908
3.9.0 216 2,842 762 938 1,967 2,026 12,127 135 0 21,013
3.10.0 0 0 1 16 24 9 13 0 0 63
3.10.1 0 1 6,047 50,000 122,244 74,641 26,640 10,530 100 290,203
3.11.0 0 0 1,770 47,344 13,526 8,204 3,312 1,927 52 76,135
Total 227 3,104 28,004 98,643 139,710 87,918 45,442 12,617 152 415,817

Download proportions (no Python 3.9 / Flit 3.10.1 outlier)

3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 Total
3.7.0 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 0.01%
3.7.1 0.00% 0.05% 4.65% 0.07% 0.09% 0.00% 0.05% 0.00% 0.00% 4.92%
3.8.0 0.00% 0.01% 0.02% 0.01% 0.38% 0.72% 0.75% 0.00% 0.00% 1.90%
3.9.0 0.05% 0.68% 0.18% 0.23% 0.47% 0.49% 2.92% 0.03% 0.00% 5.05%
3.10.0 0.00% 0.00% 0.00% 0.00% 0.01% 0.00% 0.00% 0.00% 0.00% 0.02%
3.10.1 0.00% 0.00% 1.45% 12.02% 29.40% 17.95% 6.41% 2.53% 0.02% 69.79%
3.11.0 0.00% 0.00% 0.43% 11.39% 3.25% 1.97% 0.80% 0.46% 0.01% 18.31%
Total 0.05% 0.75% 6.73% 23.72% 33.60% 21.14% 10.93% 3.03% 0.04% 100%

@gotmax23
Copy link
Contributor

We still maintain a flit-core RPM in EPEL 8 (Python 3.6) which is supported until 2029 but not reflected in the PyPI statistics, so take that for what it's worth.

@AA-Turner
Copy link
Contributor Author

By 2029 Python 3.13 will be end-of-life! Does your package attempt to update to new versions of flit(-core)?

I imagine it would be fairly easy to patch out 3.9+ features (we won't be using match/case soon), but my personal opinion would be not to factor downstream redistributors into the support decision -- they have their own policies for their own audiences.

A

@takluyver
Copy link
Member

Thanks, that's good to know about, though we're not likely to keep supporting Python 3.6 upstream for another 5 years.

What's your general plan when packages drop the Python version you're on? I think I'm already something of an outlier in maintaining support for as long as I do (compare Numpy's policy), so you've presumably had this for a lot of packages already. Do you stick with an old version and try to backport specific changes that seem important enough? Or do you take newer versions and modify them to get around compatibility issues? Or a mixture?

@gotmax23
Copy link
Contributor

Thanks, that's good to know about, though we're not likely to keep supporting Python 3.6 upstream for another 5 years.

Definitely. I just wanted to point out that there were other people still using 3.6.

What's your general plan when packages drop the Python version you're on?

Generally, we avoid updating Python libraries in stable releases unless there's a strong reason to do so (e.g., security fixes, major bugfixes, and update that's needed by another package, user-requested features that don't come with other incompatible changes). By the time an upstream drops compatibility for the Python version we are using, we usually just manually backport specific changes, but this is not always straightforward.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants