Differences between revisions 1 and 18 (spanning 17 versions)
Revision 1 as of 2019-07-23 19:43:16
Size: 1943
Comment: add initial check list
Revision 18 as of 2019-10-22 15:10:28
Size: 4780
Editor: lamby
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Announcement: https://lists.debian.org/debian-python/2019/07/msg00080.html

Transition: https://release.debian.org/transitions/html/python2-rm.html

Fedora: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

Python 2 Countdown: https://pythonclock.org/
Line 4: Line 12:
Quick list of things to do while removing Python  If you want to remove Python 2 / PyPy binary
Before removing
binary package with Python 2 / PyPy stuff make sure to check these:
Quick list of things to do while removing Python / PyPy binary package:
Line 7: Line 14:
 * check `apt rdepends python-foo` and … TOOD: build-depends (`reverse-depends -b python-foo` from ubuntu-dev-tools package?).  * port upstream package to python3 (or file upstream bug): make sure package doesn't call `python` at build- or compile time (as there won't be a python package and no `python` command in bullseye, only `python3`.)
* check `apt rdepends python-foo` and … TODO: build-depends (`reverse-depends -b python-foo` from ubuntu-dev-tools package?).
Line 10: Line 18:
   NOTE: If python-foo installed a /usr/bin/foo, then python3-foo must now begin installing one.
Line 11: Line 20:
 * remove ''--with python2'' from debian/rules if your package didn't use dh-sequence-python2 build dependency
Line 16: Line 26:
   do not close the bug in the changelog    do not close the bug in the changelog (exception: applications moving to Python 3)
Line 22: Line 32:
== Suggested commands for also finding autopkgtests ==

To search for all runtime Depends/Recommends, and all mentions in the Sources
index (Build-Depends*, Testsuite-Triggers, and the package itself):

Where $module is *binary* package name.

{{{
grep-dctrl -w -F Depends,Recommends -s Source "python-$module"
/var/lib/apt/lists/*_debian_dists_{unstable,sid}_main_binary-amd64_Packages
grep-dctrl -w -s Package "python-$module"
/var/lib/apt/lists/*_debian_dists_{unstable,sid}_main_source_Sources
}}}

Outputs only this package's source name => ready to be removed
Outputs other source package(s) => not ready yet
Outputs nothing => package doesn't exist (either it's already been
removed, or you mis-spelt it)

apt-cache rdepends python-$module can slow and does not find autopkgtest depends.

(Suggested by Rebecca Palmer on the debian-python mailing list)
Line 25: Line 57:
 * '''py2removal''' - all packages affected by Python 2 / PyPy removal
 * '''py2leaf''' - leaf package ready to be removed, i.e. without (build-)dependencies
Every package should be tagged with:

* '''[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=py2removal;users=debian-python@lists.debian.org|py2removal]]''' - all packages affected by Python 2 / PyPy removal

Add more tags for better classifications:

 * '''[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=py2leaf;users=debian-python@lists.debian.org|py2leaf]]''' - leaf package ready to be removed, i.e. without (build-)dependencies
Line 28: Line 65:
 * '''py3available''' - Python 3 support is available upstream, package needs an  * '''[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=py3available;users=debian-python@lists.debian.org|py3available]]''' - Python 3 support is available upstream, package needs an
Line 30: Line 67:
 * '''py3noport''' - there's no upstream support for Python 3, needs a port done by us  * '''[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=py3noport;users=debian-python@lists.debian.org|py3noport]]''' - there's no upstream support for Python 3, needs a port done by us
Line 32: Line 69:
 * '''py2keep''' - package that should not be removed for now (popcon >1000 by  * '''[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=py2keep;users=debian-python@lists.debian.org|py2keep]]''' - package that should not be removed for now (popcon >1000 by
Line 35: Line 72:
 * '''py2rm''' - packages that we will remove from Debian due to low popcon, etc.
  - all packages with popcon <100 will get this one by default, but it can be
 * '''[[http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=py2rm;users=debian-python@lists.debian.org|py2rm]]''' - packages that we will remove from Debian due to low popcon, etc.
  - all packages with popcon <300 will get this one by default, but it can be
Line 38: Line 75:


== FAQ ==

=== My package is affected only because it uses python-sphinx to generate documentation, what should I do? ===
just replace it with python3-sphinx, and in debian/rules, you can invoke Sphinx this way (the team do not recommand using the 'sphinx-build' command):

python3 -m sphinx

== Discussions/Proposals ==

{{{
> - bumping lintian info to warn, warn to error, ask ftp-master
> to autoreject packages for some errors?
}}}

 * Likely to get pushback from ftp-master; notwithstanding the problems and advantages of removing Python2, autorejects should be for really rather severe issues IMHO.

Python 2 / PyPy removal help page

Announcement: https://lists.debian.org/debian-python/2019/07/msg00080.html

Transition: https://release.debian.org/transitions/html/python2-rm.html

Fedora: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

Python 2 Countdown: https://pythonclock.org/

Check list

Quick list of things to do while removing Python / ?PyPy binary package:

  • port upstream package to python3 (or file upstream bug): make sure package doesn't call python at build- or compile time (as there won't be a python package and no python command in bullseye, only python3.)

  • check apt rdepends python-foo and … TODO: build-depends (reverse-depends -b python-foo from ubuntu-dev-tools package?).

    • NOTE: If there are reverse dependencies, you cannot remove it yet!
  • remove python-foo and pypy-foo from debian/control
    • NOTE: If python-foo installed a /usr/bin/foo, then python3-foo must now begin installing one.
  • remove python-foo and pypy-foo from debian/rules
  • remove --with python2 from debian/rules if your package didn't use dh-sequence-python2 build dependency

  • remove python-foo and pypy-foo from debian/tests
  • if documentation was in python-foo - move it to python3-foo or python-foo-doc
    • (do not remove python-foo-doc or rename it to python3-foo-doc)

  • check/remove debian/python-foo.* and pypy-foo.* files
  • mention Python 2 / ?PyPy removal in debian/changelog

    • do not close the bug in the changelog (exception: applications moving to Python 3)
  • build the source package
  • test it
  • upload it to unstable
  • reassign py2removal bug to ftp.debian.org pseudo package, rename it to "FIXME: proper title to remove binary package only"

Suggested commands for also finding autopkgtests

To search for all runtime Depends/Recommends, and all mentions in the Sources index (Build-Depends*, Testsuite-Triggers, and the package itself):

Where $module is *binary* package name.

grep-dctrl -w -F Depends,Recommends -s Source "python-$module" 
/var/lib/apt/lists/*_debian_dists_{unstable,sid}_main_binary-amd64_Packages 
grep-dctrl -w -s Package "python-$module" 
/var/lib/apt/lists/*_debian_dists_{unstable,sid}_main_source_Sources

Outputs only this package's source name => ready to be removed Outputs other source package(s) => not ready yet Outputs nothing => package doesn't exist (either it's already been removed, or you mis-spelt it)

apt-cache rdepends python-$module can slow and does not find autopkgtest depends.

(Suggested by Rebecca Palmer on the debian-python mailing list)

usertags (debian-python@lists.debian.org)

Every package should be tagged with:

  • py2removal - all packages affected by Python 2 / ?PyPy removal

Add more tags for better classifications:

  • py2leaf - leaf package ready to be removed, i.e. without (build-)dependencies

    • (including Recommends) in Debian main,
  • py3available - Python 3 support is available upstream, package needs an

    • update in Debian,
  • py3noport - there's no upstream support for Python 3, needs a port done by us

    • or package will be removed,
  • py2keep - package that should not be removed for now (popcon >1000 by

    • default). Please don't add this usertag without discussing it on the mailing list first,
  • py2rm - packages that we will remove from Debian due to low popcon, etc.

    • - all packages with popcon <300 will get this one by default, but it can be removed

FAQ

My package is affected only because it uses python-sphinx to generate documentation, what should I do?

just replace it with python3-sphinx, and in debian/rules, you can invoke Sphinx this way (the team do not recommand using the 'sphinx-build' command):

python3 -m sphinx

Discussions/Proposals

>  - bumping lintian info to warn, warn to error, ask ftp-master
>    to autoreject packages for some errors?
  • Likely to get pushback from ftp-master; notwithstanding the problems and advantages of removing Python2, autorejects should be for really rather severe issues IMHO.