From: Brett Cannon Date: Sat, 9 Apr 2022 00:15:35 +0000 (-0700) Subject: bpo-47061: deprecate cgi and cgitb (GH-32410) X-Git-Tag: v3.11.0b1~415 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd29bd13ef1fe18970c5d43b66c545dd03117cb9;p=thirdparty%2FPython%2Fcpython.git bpo-47061: deprecate cgi and cgitb (GH-32410) Part of PEP 594. --- diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 2da01d8105ac..2758a268e957 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -834,6 +834,8 @@ Deprecated * :mod:`aifc` * :mod:`audioop` + * :mod:`cgi` + * :mod:`cgitb` (Contributed by Brett Cannon in :issue:`47061`.) diff --git a/Lib/cgi.py b/Lib/cgi.py index 22897a14a9c1..8787567be7c0 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -53,6 +53,9 @@ __all__ = ["MiniFieldStorage", "FieldStorage", "parse", "parse_multipart", "print_form", "print_directory", "print_arguments", "print_environ_usage"] + +warnings._deprecated(__name__, remove=(3,13)) + # Logging support # =============== diff --git a/Lib/cgitb.py b/Lib/cgitb.py index ec156843099d..8ce0e833a989 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -31,8 +31,12 @@ import tempfile import time import tokenize import traceback +import warnings from html import escape as html_escape +warnings._deprecated(__name__, remove=(3, 13)) + + def reset(): """Return a string that resets the CGI and browser to a known state.""" return '''