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.

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

python3-standard-aifc

asynchat

https://github.com/simonrob/pyasynchat

Not in Debian

asyncore

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

audioop

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

It is not a direct replacement

cgi

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

Packaged in Debian

cgitb

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

Packaged in Debian

chunk

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

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

Not in Debian

crypt_r

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

Packaging in Debian

imghdr

puremagic

mailcap

python3-standard-mailcap

msilib

TBD

nntplib

python3-standard-nntplib

nis

TBD

ossaudiodev

TBD

pipes

python3-standard-pipes

smtpd

python3-standard-smtpd

sndhdr

python3-standard-sndhdr

spwd

TBD

sunau

python3-standard-sunau

telnetlib

https://salsa.debian.org/python-team/packages/zombie-telnetlib/

Single file packaged as a native package

uu

python3-standard-uu

xdrlib

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
}