Python Dead Batteries
Standard Library
Python comes with batteries included.
Still the Python project decided there were far too many obsolete/unmaintained batteries and the result was PEP 594:
https://peps.python.org/pep-0594/
Packages to replace deprecated modules
During Python BoF in DebConf24 it was decided to create a list of possible packages that should be in Debian to cover deprecated modules. Please, if you know any other, just add it.
module |
replacement |
Comments |
aifc |
https://tracker.debian.org/pkg/python-pydub, https://tracker.debian.org/pkg/audioread |
They are not direct remplacement |
asynchat |
Not in Debian |
|
asyncore |
||
audioop |
It is not a direct replacement |
|
cgi |
Not in Debian |
|
cgitb |
Not in Debian |
|
chunk |
Not in Debian. But it's mentioned in discuss.p.o https://discuss.python.org/t/recharging-chunk-related-dead-batteries-pep594-feedback-appreciated/39963 |
|
crypt |
Not in Debian |
|
imghdr |
TBD |
|
mailcap |
TBD |
|
msilib |
TBD |
|
nntplib |
TBD |
|
nis |
TBD |
|
ossaudiodev |
TBD |
|
pipes |
TBD |
|
smtpd |
TBD |
|
sndhdr |
TBD |
|
spwd |
TBD |
|
sunau |
TBD |
|
telnetlib |
https://salsa.debian.org/python-team/packages/zombie-telnetlib/ |
Single file packaged as a native package |
uu |
TBD |
|
xdrlib |
TBD |
Common Dependencies
Roughly sorted by descending polularity/impact.
- astunparse
python3-amqplib -> use python3-amqp instead
oauth2client https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070819
- distutils : replace with setuptools
- mock : replace usage with unittest.mock from standard library
- zombie-imp : replace with importlib
entrypoints https://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=1052826#20
- cython3-legacy : replace with cython3
appdirs https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060427
pyasyncore https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058361
pyinotify https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004387
- mistune0 : replace with plain mistune
- python3-singledispatch
- python3-contextlib2 : replace with contextlib from standard library
- python3-fs : replace with python3-fsspec
- unittest2 : replace with unittest
- lockfile: see #1073840 to have an example how to replace with filelock
entrypoints: work is needed on intake (from the Debian Med Team) and ipyparallel (upstream bug); jupyter-client doesn't need it anymore but the fix isn't uploaded yet
- patsy: "patsy is no longer under active development. As of August 2021,..."
- python3-ipython-genutils
- sphinx-testing "This package has been deprecated. Please use sphinx.testing package instead. It is bundled with Sphinx."
digraph removals { six mock nose zombie_imp [label="zombie-imp"] py312 [color=green] lib2to3 [label="2to3"] cython3_legacy [label="cython3-legacy"] mistune0 m2r unittest2 lockfile distutils ipython_genutils lib2to3 -> py312 distutils -> lib2to3 distutils -> py311 nose -> zombie_imp cython3_legacy -> zombie_imp nose -> lib2to3 mistune0 -> nose m2r -> mistune0 lockfile -> nose ipython_genutils -> nose }