Chapter 1. Completing the move to Python 3

Debian has previously supported two Python stacks, one for Python 3 and one for Python 2. The goal for Debian is to reduce this to one stack, dropping the Python 2 stack and interpreter for the Bullseye release.

PEP 404 states that no more major Python 2 releases are planned, although the latest released minor version 2.7 will see some extended support, documented in PEP 466.

Packages in Debian should use Python 3. New packages must use Python 3 from the initial upload, new upstream versions for existing packages must use Python 3. If Python 2 is still supported in Bullseye, selected packages may continue using Python 2 until Python 3 support is available for those packages. Please discuss all use of Python 2 on the debian-python mailing list before uploading.

  1. Applications should use Python 3 and must not be packaged for Python 2 as well. If an application supports only Python 2, the application may need to be removed from Debian so that it does not block removal of other Python 2 packages.

  2. Python libraries need to support Python 3 and new versions must be packaged for Python 3. Existing Python 2 libraries must not be dropped before the last reverse dependency is removed. New Python 2 libraries must not be introduced.

  3. Python 3 should be used for the packaging if the packaging scripts use Python.