Uh oh!
There was an error while loading. Please reload this page.
gh-109096: Deprecate http.server.CGIHTTPRequestHandler - #109387
Conversation
vstinner
commented
Sep 15, 2023
Since the cgi module was removed in Python 3.13, it makes sense to deprecate CGIHTTPRequestHandler. wsgiref has BaseCGIHandler, CGIHandler and IISCGIHandler classes. Are they still relevant nowadays? WSGI isn't suppose to replace CGI? wsgiref.simple_ref uses |
gpshead
commented
Sep 15, 2023
WSGI used much of the original CGI web server to application interfaces to make migrating from old CGI scripts child processes to in-server-process WSGI calls easy. https://peps.python.org/pep-3333/#specification-details |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JelleZijlstra
left a comment
There was a problem hiding this comment.
Couple of wording suggestions. Deprecating CGI sounds like a good idea
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
vstinner
left a comment
There was a problem hiding this comment.
Can you please document the deprecation at https://docs.python.org/dev/whatsnew/3.13.html#deprecated and the future removal at https://docs.python.org/dev/whatsnew/3.13.html#pending-removal-in-python-3-15 ?
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I dislike the _self hack in the test but it's not a big deal.
gpshead
commented
Sep 15, 2023
Agreed. If it weren't in test code set to be deleted in two years I'd have refactored further. |
bedevere-bot
commented
Sep 15, 2023
|
bedevere-bot
commented
Sep 15, 2023
|
bedevere-bot
commented
Sep 15, 2023
|
…n#109387) Deprecate `http.server.CGIHTTPRequestHandler`. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Peterl777
commented
Oct 19, 2023
Only just came across this. As a teacher of Python, where I usually only have access to core Python (no internet access), I have found the |
vstinner
commented
Oct 19, 2023
You can provide Python with a old (non deprecated) copy of CGIHTTPRequestHandler to your students. |
Peterl777
commented
Oct 20, 2023
Yes, that would work. But often I can't bring any external code in either; they've got core Python and that's all I can work with. |
So far I haven't found any practical users of this 1990s era functionality. Given we don't encourage the use of
http.serveras anyones main serving stack and that using the old CGI child process and environment method fell out of favor ages ago... Lets see if we can deprecate it.📚 Documentation preview 📚: https://cpython-previews--109387.org.readthedocs.build/