| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
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 env['GATEWAY_INTERFACE'] = 'CGI/1.1'. Is it WSGI or CGI? I'm confused :-( |
Sorry, something went wrong.
|
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 |
Sorry, something went wrong.
There was a problem hiding this comment.
Couple of wording suggestions. Deprecating CGI sounds like a good idea
Sorry, something went wrong.
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>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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 ?
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. I dislike the _self hack in the test but it's not a big deal.
Sorry, something went wrong.
Agreed. If it weren't in test code set to be deleted in two years I'd have refactored further. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x RHEL7 3.x has failed when building commit 59073c9. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/179/builds/5489 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1004, in exec_module
File "<frozen importlib._bootstrap_external>", line 1100, in get_code
File "<frozen importlib._bootstrap_external>", line 1199, in get_data
TypeError: descriptor 'close' for '_io.BufferedReader' objects doesn't apply to a '_io.FileIO' object
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/threading.py", line 1059, in _bootstrap_inner
self.run()
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/threading.py", line 996, in run
self._target(*self._args, **self._kwargs)
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_interpreters.py", line 483, in task
interp = interpreters.create()
^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/support/interpreters.py", line 25, in create
id = _interpreters.create(isolated=isolated)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: interpreter creation failed
k
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_tools/test_freeze.py", line 28, in test_freeze_simple_script
outdir, scriptfile, python = helper.prepare(script, outdir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Tools/freeze/test/freeze.py", line 146, in prepare
copy_source_tree(srcdir, SRCDIR)
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Tools/freeze/test/freeze.py", line 95, in copy_source_tree
shutil.copytree(oldroot, newroot, ignore=ignore_non_src)
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/shutil.py", line 588, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/shutil.py", line 542, in _copytree
raise Error(errors)
shutil.Error: [('/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/build/test_python_16368æ/@test_16368_tmpæ-tardir/extractall_ctrl/ustar/fifotype', '/tmp/test_python_f41cjpzy/tmp92oau7y2/cpython/build/test_python_16368æ/@test_16368_tmpæ-tardir/extractall_ctrl/ustar/fifotype', '`/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/build/test_python_16368æ/@test_16368_tmpæ-tardir/extractall_ctrl/ustar/fifotype` is a named pipe'), ('/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/build/test_python_16368æ/@test_16368_tmpæ-tardir/extractall_none/ustar/fifotype', '/tmp/test_python_f41cjpzy/tmp92oau7y2/cpython/build/test_python_16368æ/@test_16368_tmpæ-tardir/extractall_none/ustar/fifotype', '`/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/build/test_python_16368æ/@test_16368_tmpæ-tardir/extractall_none/ustar/fifotype` is a named pipe')]
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x RHEL8 3.x has failed when building commit 59073c9. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/509/builds/4921 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/test/test_asyncio/test_subprocess.py", line 788, in test_subprocess_consistent_callbacks
self.loop.run_until_complete(main())
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/asyncio/base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/test/test_asyncio/test_subprocess.py", line 780, in main
self.assertEqual(events, [
AssertionError: Lists differ: ['process_exited', ('pipe_data_received', 1, b'stdout')] != [('pipe_data_received', 1, b'stdout'), ('p[95 chars]ted']
|
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot PPC64LE Fedora Stable LTO + PGO 3.x has failed when building commit 59073c9. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/101/builds/3754 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/test/test_venv.py", line 580, in test_zippath_from_non_installed_posix
shutil.copytree(fn, os.path.join(libdir, name))
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/shutil.py", line 588, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/shutil.py", line 542, in _copytree
raise Error(errors)
shutil.Error: [('/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/test/test_json/__pycache__/test_float.cpython-313.pyc.140735984064752', '/tmp/test_python_jv6l7pxc/tmpviaat877/lib/python3.13/test/test_json/__pycache__/test_float.cpython-313.pyc.140735984064752', "[Errno 2] No such file or directory: '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.lto-pgo/build/Lib/test/test_json/__pycache__/test_float.cpython-313.pyc.140735984064752'")]
|
Sorry, something went wrong.
…n#109387) Deprecate `http.server.CGIHTTPRequestHandler`. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
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 CGIHTTPRequestHandler really useful for teaching basic web processes. I can't go to a fully-fledged web framework. CGI is really useful for students to get the whole POST/run/output process with minimal effort and maximal engagement. |
Sorry, something went wrong.
You can provide Python with a old (non deprecated) copy of CGIHTTPRequestHandler to your students. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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/