Python is against Backwards Compatibility
Jul 2025 - Alex Alejandre

A few years ago I would have said, “and of course it’s boring technology that’s been supported in the Python standard library forever,” but apparently the remaining Python maintainers are the ones who think that code stability and backwards compatibility with boring technology are actively harmful things, so they’ve been removing modules from the standard library if they are too boring and stable. I swear I am not making this up. The cgi module is removed in 3.13.

The justification refers to complaints from 2000, describing cgi as “designed poorly and are now near-impossible to fix” because it starts new processes.

There is a 3rd-party drop-in replacement and legacy-cgi. Indeed, that’s what they want:

Python has a rich and vibrant ecosystem of third-party packages. … Python’s standard library is piling up with cruft, unnecessary duplication of functionality, and dispensable features

Python maintainers happily make breaking changes for the sake of breakage.

Now, cgi is easy and empowers many better languages, so little loss either way.