4 ms·
Looks like CGI was recently removed from python 3. https://docs.python.org/3/library/cgi.html https://docs.python.org/3/library/cgi.html What is a modern pytho
by carodgers 1y ago
Looks like CGI was recently removed from python 3. https://docs.python.org/3/library/cgi.html https://docs.python.org/3/library/cgi.html
What is a modern python-friendly alternative?
- kragen 1y agoPython has a policy against maintaining compatibility with boring technology. We discussed this at some length in this thread the other day at https://news.ycombinator.com/item?id=44477966 https://news.ycombinator.com/item?id=44477966; many people voiced their opposition to the policy. The alternatives suggested for the specific case of the cgi module were: - wsgiref.handlers.CGIHandler, which is not deprecated yet. gvalkov provided example code for Flask at https://news.ycombinator.com/item?id=44479388 https://news.ycombinator.com/item?id=44479388 - use a language that isn't Python so you don't have to debug your code every year to make it work again when the language maintainers intentionally break it - install the old cgi module for new Python from https://github.com/jackrosenthal/legacy-cgi https://github.com/jackrosenthal/legacy-cgi - continue using Python 3.12, where the module is still in the standard library, until mid-02028