2. Goals of the new Python policy

The new policy is designed to reduce the load on people packaging Python modules, and, by the dint of doing so, ease the transition that occur as new Python versions are introduced, old ones removed, and as the default version of Python changes, with minimal impact on the target system. As far as possible, Python version transition events are handled by automated processes, and minimal effort recompilation of new versions when the process can not be fully automated.

The new policy also reduces the numbers of packages in the archive, by supporting multiple versions of Python in the same binary package (at the cost of increased size of that one package, but it should still result in space saving.) [2]

This presupposes that the package build mechanism utilizes the utility pyversions to get information about the supported Python versions, the currently installed Python executable versions, and the default Python runtime, instead of hard coding values in the debian/rules script. This script can also be used to parse the value of the XS-Python-Version field in the debian/control or debian/pyversions.

Another consequence of the current design: the default python version has to be installed, other supported versions can be installed additionally, not as a replacement.

Notes

[1]

The older policy required an extra upload of every package containing an extension, adding new dependencies on new shared libraries in unstable, but not yet in testing. It also tended to require all packages that required a version of python strictly less than a specific version to move into testing at the same time, creating long periods where packages were blocked.

[2]

The two cases where this happens is

  • Public extension modules, where extensions compiled for multiple versions of Python are shipped in the same package, and

  • Pure modules where different versions of the upstream package are shipped and are directly installed into /usr/lib/pythonX.Y.