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.
There are also long-lived Backports of standard modules.
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 |
removed in Python... |
replacement |
Comments |
2to3 |
3.13 |
python3-fissix |
|
aifc |
3.12 |
python3-standard-aifc |
|
asynchat |
3.12 |
Not in Debian |
|
asyncore |
3.12 |
Packaged in Debian |
|
audioop |
3.12 |
It is not a direct replacement |
|
cgi |
3.12 |
Packaged in Debian |
|
cgitb |
3.12 |
Packaged in Debian |
|
chunk |
3.12 |
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 |
3.12 |
Not in Debian |
|
crypt_r |
3.12 |
Packaging in Debian |
|
imghdr |
3.12 |
puremagic |
|
imp |
3.12 |
python3-zombie-imp |
|
mailcap |
3.12 |
python3-standard-mailcap |
|
msilib |
3.12 |
TBD |
|
nntplib |
3.12 |
python3-standard-nntplib |
|
nis |
3.12 |
TBD |
|
ossaudiodev |
3.12 |
TBD |
|
pipes |
3.12 |
python3-standard-pipes |
|
smtpd |
3.12 |
python3-standard-smtpd |
|
sndhdr |
3.12 |
python3-standard-sndhdr |
|
spwd |
3.12 |
TBD |
|
sunau |
3.12 |
python3-standard-sunau |
|
telnetlib |
3.12 |
https://salsa.debian.org/python-team/packages/zombie-telnetlib/ |
Single file packaged as a native package |
uu |
3.12 |
python3-standard-uu |
|
xdrlib |
3.12 |
python3-mda-xdrlib |
Common Dependencies
Roughly sorted by descending polularity/impact.
pep8 -> use pycodestyle
python3-amqplib -> use python3-amqp instead
oauth2client Bug #1070819
distutils : replace with setuptools
- cython3-legacy : replace with cython3
appdirs https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060427
pyinotify https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004387
- mistune0 : replace with plain mistune
- python3-fs : replace with python3-fsspec
- python3-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)
- 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."
- python3-async-timeout: upstreamed into Python 3.11+ (use asyncio.Timeout)
bleach -> nh3: https://blog.ohheybrian.com/2023/06/moving-from-bleach-to-nh3/
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
}