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

https://bugs.python.org/issue40360

aifc

3.12

python3-standard-aifc

asynchat

3.12

https://github.com/simonrob/pyasynchat

Not in Debian

asyncore

3.12

https://tracker.debian.org/pkg/python-pyasyncore

Packaged in Debian

audioop

3.12

https://tracker.debian.org/pkg/pysoundfile

It is not a direct replacement

cgi

3.12

https://pypi.org/project/legacy-cgi/

Packaged in Debian

cgitb

3.12

https://pypi.org/project/legacy-cgi/

Packaged in Debian

chunk

3.12

https://github.com/jscuster/ChunkMuncher

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

https://pypi.org/project/legacycrypt/

Not in Debian

crypt_r

3.12

https://pypi.org/project/crypt-r/

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.

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
}