python breaking changes

pypi

4 curated breaking changes across major versions of python. Use this as a migration checklist before bumping dependencies.

4
changes
Breaking changes by transition
  • 3.12 \u2192 3.13removal

    Many stdlib modules removed: cgi, cgitb, crypt, imghdr, mailcap, nis, nntplib, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, audioop, chunk, msilib.

    Migration

    Replace with third-party alternatives. `cgi` -> `multipart`, `imghdr` -> `pillow`, etc.

  • 3.12 \u2192 3.13runtime

    Experimental JIT compiler and free-threaded build (no-GIL) available. Default build unchanged.

    Migration

    Not breaking. Opt in via `--enable-experimental-jit` or `--disable-gil` at compile time.

  • 3.11 \u2192 3.12api

    New type parameter syntax: `def foo[T](x: T) -> T` without TypeVar imports.

    Migration

    Optional. Old TypeVar syntax still works. New syntax requires 3.12+ in source files.

  • 3.11 \u2192 3.12removal

    distutils removed from stdlib (deprecated since 3.10).

    Migration

    Replace with `setuptools` or `packaging`. Many setup.py scripts need updating.

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/pypi/python
python breaking changes — PyPI migration guide | DepScope