Text of discuss.python.org › t › cgi-module-replacement › 68856 as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Cgi Module Replacement - Python Help - Discussions on Python.org

Cgi Module Replacement Python Help onePythonUser (Paul) October 23, 2024, 2:20am 1 Hello, based on this thread: Is Python going to adopt an official replacement for the cgi module such that a message will be included when the following message is generated (i.e., import this_module_as_replacement ) when attempting to import the cgi ? depracated_cgi 642×115 21.5 KB chepner (Clint Hepner) October 23, 2024, 12:52pm 2 I believe Python’s official stance is to stop using CGI and use a different framework/architecture.

If you want to continue using CGI, your options are: Don’t upgrade to Python 3.13 Rewrite your application to use something other than CGI Use a third-party CGI library What’s New In Python 3.13 — Python 3.13.0 documentation ) lists some recommendations (taken from PEP 594 ) for replacing specific functions from the cgi module. onePythonUser (Paul) October 23, 2024, 1:05pm 3 Thank you @chepner for providing this insight.

Much appreciated. mwr (mwr) October 23, 2024, 2:33pm 4 And nowhere is there a history of modules being deleted with recommendations for replacement? I.e. not only for version 3.13 but also for previous ones, at least for python3. fungi (fungi) October 23, 2024, 3:05pm 5 And nowhere is there a history of modules being deleted with recommendations for replacement? I.e. not only for version 3.13 but also for previous ones, at least for python3.

3.13 was fairly notable because it was a large batch, but PEP 594 did also cover some things that were removed in 3.12, and is AFAIK essentially the first real cleanup since 3.0 (many of the removals referenced were proposed for deprecation as early as the 2.0 and 3.0 release timeframes). Any contemporary recommendations for replacement of older removals decades ago are likely to be outdated now though, and increasingly useless as time goes by. mwr (mwr) October 23, 2024, 3:11pm 6 I think maybe I can still suggest the idea of keeping a history of deleted modules, where it will be possible to at least quickly understand which modules were deleted earlier.

There will probably be such deletions in the future, and it will be easier to see the full list of deletions by python version than to run through the history of each version. dbohdan (D. Bohdan) November 21, 2024, 9:38am 7 It was curious if there were original third-party CGI libraries for Python that were maintained and went looking. I didn’t find any, but I found a project called “legacy-cgi” ( PyPI , GitHub ).

It packages cgi and cgitb for Python >= 3.10.