9

I'm curious if Ubuntu "pins" minor Python versions for each of its releases. Looking at the package details for python3 in Focal, compared to other LTS releases, e.g. Bionic seems to be sticking to Python 3.6. Is this documented anywhere to be true? Or is it just the status quo at the moment? Or am I misunderstanding Ubuntu packages?

I did find a related question, but not quite in the same vein so it didn't answer my question: Pin Python minor version in Ubuntu 18.04.4 LTS

wjandrea
  • 14,236
  • 4
  • 48
  • 98

1 Answers1

19

Your understanding is accurate.

A release of Ubuntu sticks with the same 3.x release of Python for the entire life of that Ubuntu release. Ubuntu 18.04 (Bionic) will indeed stick to Python 3.6 until Bionic reaches EOL in 2028.

  • Ubuntu 20.04 = Python 3.8
  • Ubuntu 22.04 = Python 3.10

Sticking to a single version for the life of the release of Ubuntu is the way that Debian-based distros have worked for over 20 years: With a couple exceptions, all software uses a single common set of dependencies. Only security patches and bugfixes that don't break the common set are pushed after release. New versions tend to break that common set of dependencies, so new versions await the next release. That's one of the reasons that Ubuntu releases anew every six months.

Many distros, including Ubuntu, use a lot of Python under the hood. Changing the Python version can break things. Example: This site is soaked in the tears of folks who broke apt by changing their version of Python.

user535733
  • 62,253