NewsCrawler.org

544 unmaintained PyPI packages fail on Python 3.12+ yet get over 100M downloads a month

PyPI code that breaks on Python 3.12 and 3.13. Projects that import a removed module: 3,763 (of 354,763 indexed projects) vs 1,623 (with an unguarded import in their own code). Of the 60,000 most downloaded: 852 (with an unguarded import) vs 544 (of them with no release in two years). Downloads of those stale projects: 126M (in the 30 days before the scan). import nose and import boto fail on Python 3.12 and later, yet the two still get 5.2M downloads a month. Their last releases: 2015 and 2018. Removed in 3.12: distutils, imp, asyncore, asynchat, smtpd. In 3.13: the 19 PEP 594 modules and lib2to3. Latest release of 354,763 projects. py-code.org
Image: Reddit

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

    72 comments

Published: First seen: Читать по-русски

Open as a page