legacy-cgi
Fork of the standard library cgi and cgitb modules removed in Python 3.13
Decision gist · record as of 2026-08-14
Yes, if you have code that depends on cgi or cgitb and cannot immediately refactor to ASGI or WSGI. Install it conditionally to avoid unnecessary overhead on older Python versions. No security vulnerabilities are known. Not recommended for new projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Intended for Python 3.13+; on earlier versions the built-in stdlib modules take precedence, making this package unnecessary.
- Low install friction with no runtime dependencies.
- Maintenance status is aging—last commit was 2025-10-27—but the package remains active.
License · maintenance · safety
PSF-2.0 (permissive) — Licensed under PSF-2.0 (permissive), the same license as Python itself. No restrictions on use or redistribution in typical projects.
last release 2025-10-27 (291 days) · last repo commit 2025-10-27 · 48 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,193,550 downloads/mo, #1,960 on PyPI
Alternatives
Verify before relying
pip install legacy-cgi
import cgi
form = cgi.FieldStorage()- Whether the package handles all edge cases that arose during stdlib removal in Python 3.13.
- Performance characteristics compared to modern ASGI/WSGI alternatives for production deployments.
- Full compatibility scope with all cgi and cgitb use patterns from Python 3.12 and earlier.
What it is and what it does
legacy-cgi is a fork of Python's cgi and cgitb modules that were removed from the standard library in Python 3.13 per PEP-594. It restores those modules for projects that still depend on them, allowing CGI scripts written for Python 3.12 and earlier to run unchanged on newer Python versions.
The package has no runtime dependencies and is designed purely for compatibility—the author explicitly recommends that new applications use ASGI or WSGI frameworks instead. It is most useful as a conditional dependency for legacy codebases that cannot immediately migrate away from CGI.
Use it for
- Running existing CGI scripts on Python 3.13+ without rewriting them to use modern web frameworks.
- Maintaining backward compatibility in projects that still use cgi.FieldStorage or cgitb for error handling.
- Gradual migration of legacy systems by keeping old CGI code functional while planning a transition to ASGI or WSGI.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you have code that depends on cgi or cgitb and cannot immediately refactor to ASGI or WSGI.
Install it conditionally to avoid unnecessary overhead on older Python versions. No security vulnerabilities are known. Not recommended for new projects.
Install
legacy-cgi on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last commit was 2025-10-27—but the package remains active. Suitable for projects that need backward compatibility with removed stdlib modules.
Intended for Python 3.13+; on earlier versions the built-in stdlib modules take precedence, making this package unnecessary.
License in practice
Licensed under PSF-2.0 (permissive), the same license as Python itself. No restrictions on use or redistribution in typical projects.
Quickstart
pip install legacy-cgi
import cgi
form = cgi.FieldStorage()
Verify before relying
- Whether the package handles all edge cases that arose during stdlib removal in Python 3.13.
- Performance characteristics compared to modern ASGI/WSGI alternatives for production deployments.
- Full compatibility scope with all cgi and cgitb use patterns from Python 3.12 and earlier.
Package facts
| License | PSF-2.0 permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 291 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,193,550 / month, #1,960 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: legacy_cgi-2.6.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cgi module python 3.13”
- legacy-cgiProvides the cgi and cgitb modules removed from Python 3.13's…
- standard-imghdrProvides the `imghdr` module, a Python standard library utility…
- standard-sunauProvides the sunau module, a standard library audio file handler…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also oldest-supported-numpy · standard-telnetlib · standard-distutils · standard-sunau · standard-imghdr · standard-chunk · enum-compat · standard-aifc · pyasynchat · wsgiref