544 unmaintained PyPI packages fail on Python 3.12+ yet get over 100M downloads a month
py-code.org checked the latest release of 354,763 PyPI projects for imports of 25 standard library modules that Python 3.12 and 3.13 removed. Python 3.12 removed distutils[1], imp, asyncore, asynchat and smtpd, and Python 3.13 removed 20 more, including cgi, pipes, audioop and telnetlib. Imports inside try/except ImportError or behind a Python version check were counted as safe.
Of the 852 widely downloaded projects with an unguarded import[2], 544 (63.8%) have had no release in two years, and together they get 126 million downloads a month. distutils is the most imported removed module, and setuptools[3] still provides it, but it fails when setuptools is not installed, for example in a new virtual environment on Python 3.12 or later. For 890 of the 1,623 projects with an unguarded import, every such import is of distutils, so installing setuptools is enough for them.
The imp module breaks nose and boto, which get 1.8 million and 3.4 million downloads a month, and both fail on Python 3.12 and later. For code you cannot change, copies of the removed modules are on PyPI, such as zombie-imp, legacy-cgi and audioop-lts. The authors warn that a package with no maintainer has nobody to fix the next security bug found in it.
Read the original py-code.orgDiscussion
Discussion
Commenters mostly blame Python for breaking changes between minor versions, which makes upgrades risky. Others say many codebases are old or run on old hardware, and that RHEL backports security fixes to its system Python 3.9. One commenter notes that many removed modules have drop-in replacements, so download counts alone do not show real breakage.
Sources
-
py-code.org
544 unmaintained PyPI packages with imports that fail on Python 3.12+ still get 100M+ downloads a month


