• Sources: primary, discussion
  • Summary: py-code.org scanned the latest release of 354,763 PyPI projects and found 3,763 importing one of 25 modules removed in Python 3.12 or 3.13, with 1,623 having an import outside a try block or version check. Among the 60,000 most downloaded projects, 852 have such an import and 544 of those had no release in two years, with 126 million downloads in 30 days. import nose and import boto fail on 3.12, while pydub, coreapi, htmlmin and pgpy fail on 3.13.
  • Why it matters: Upgrading to Python 3.12 or 3.13, or building slim venvs without setuptools, can break on transitive dependencies that are unmaintained, and the post names the PyPI shims and successors to use.
  • Background: PEP 632 removed distutils in Python 3.12, and PEP 594 removed 19 legacy 'dead batteries' modules such as cgi, pipes and telnetlib in 3.13 after at least two releases of deprecation. setuptools still provides distutils, but python -m venv stopped installing setuptools in new environments from 3.12, so the error often first appears in fresh venvs, slim Docker images or uv environments.
  • Comments: Shared on r/programming. The post includes a DuckDB query against its pinned Hugging Face dataset to reproduce the list.