I would like to use a newer version of python in my application. Right now it requests 3.8. Debian Bookworm comes with 3.11. Are there any major distributions without 3.11 or higher?
Yes loads depending on what you consider major. There are a lot of LTS distributions out there.
- Ubuntu 20.04 (oldest regular support) has Python 3.8
- Ubuntu 16.04 (oldest extended support) has Python 3.5
- Alma 8 has Python 3.6
- Rocky 8 has Python 3.6
- OpenSUSE Leap has Python 3.6
If you are not aware of the Linux distro releases that have these older Python versions then I question why you need to worry about them. If you are making something new then it is unlikely that people using these older distros would use it anyway.
I do not package my application (kajongg, part of KDE since 2012) , never did, never will. I have no full oversight over which distros package it or plan to do so.
So it seems I will have to continue supporting 3.8 for the time being
If your aim is that new versions of your application are as compatible as possible with a wide range of long term support Linux distros then it probably makes sense to keep supporting older versions of Python until it becomes completely infeasible.
However, if your aim is that new versions of your application work on normally updated Linux distros, then I would speculate that it’s now safe to drop Python 3.8, as the PSF have dropped support for 3.8: https://devguide.python.org/versions/#versions. I imagine that non-long term Linux distros are roughly keeping up with the PSF support cycle?
It depends what your goals are.
If you make a new version of your application then the distros can decide in which distro version to include that new version of your app. If the new version requires Python 3.11 then it will take some time to filter down to the distros that only like really old stuff. Continuing to support 3.8 might not make any difference though because the distros versions that have Python 3.8 as maximum Python might very well decide not to incorporate the new version of kajongg anyway.
This might not apply to your situation but in my situation I don’t worry about the old version distros. They can use old versions of my stuff with old versions of Python. If I release something now then they will use it some years in the future. If they like to use old versions of stuff then that is fine and is up to them. If people want new versions of my package then they shouldn’t get it from the Ubuntu 16.04 repos.
Leap 15.5 and higher have also Python 3.11 and Tumbleweed have Python 3.11, 3.12, and ($DEITY willing) we will switch to 3.13 as the primary interpreter.
It’s mostly just the debian-based distros that limit the python versions they redistribute. The others you’re likely to use all have a default system python version, but redistribute other versions.
You are also able to install other python versions without your distribution of choice providing it (just make sure you don’t remove the version of python that your distribution relies on or replace it in path, as it may not be compatible with the assumptions of the distribution)
Also note that for the “RHEL” style distros (including Rocky/Alma), you can get newer versions from EPEL, which isn’t a huge burden for most people using those, although I’m aware it’s not approved in a few cases. For version 8 of those, you can get up to Python 3.12 without needing to build anything.
That doesn’t apply when said application is going to be distributed by the distro in question (which seems to be what @wrohdewald is asking). I have previously been asked to support older versions of both Python and pytest for a package I wrote, because it was required for LTS support.
Yes, that’s the problem, and yes SLE-15 has still Python 3.6 as /usr/bin/python3
(and it will be forever there until the Sun explodes and will finally stop selling yet another extension of SLE-15 support), but at least you have /usr/bin/python3.11
as well.
There are no Python interpreter packages in EPEL community repositories. Instead Red Hat provides newer Python versions in AppStream. RHEL 8.10 and 9.4 added Python 3.12 with three years of support.