Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-109096: Deprecatehttp.server.CGIHTTPRequestHandler
#109387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you please document the deprecation athttps://docs.python.org/dev/whatsnew/3.13.html#deprecated and the future removal athttps://docs.python.org/dev/whatsnew/3.13.html#pending-removal-in-python-3-15 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM. I dislike the _self hack in the test but it's not a big deal.
Agreed. If it weren't in test code set to be deleted in two years I'd have refactored further. |
bedevere-bot commentedSep 15, 2023
|
bedevere-bot commentedSep 15, 2023
|
bedevere-bot commentedSep 15, 2023
|
…n#109387)Deprecate `http.server.CGIHTTPRequestHandler`.Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Peterl777 commentedOct 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 |
You can provide Python with a old (non deprecated) copy of CGIHTTPRequestHandler to your students. |
Peterl777 commentedOct 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. |
Uh oh!
There was an error while loading.Please reload this page.
So far I haven't found any practical users of this 1990s era functionality. Given we don't encourage the use of
http.server
as 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/