Skip to content

Commit 04a21a1

Browse files
committed
gh-104773: PEP 594: Remove cgi and cgitb modules
* Replace "cgi" with "!cgi" in the Sphinx documentation to avoid warnings on broken references. * test_pyclbr no longer tests the cgi module.
1 parent 7f963bf commit 04a21a1

24 files changed

+27
-2739
lines changed

Doc/library/cgi.rst

Lines changed: 0 additions & 564 deletions
This file was deleted.

Doc/library/cgitb.rst

Lines changed: 0 additions & 89 deletions
This file was deleted.

Doc/library/security_warnings.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ The following modules have specific security considerations:
99

1010
* :mod:`base64`: :ref:`base64 security considerations <base64-security>` in
1111
:rfc:`4648`
12-
* :mod:`cgi`: :ref:`CGI security considerations <cgi-security>`
1312
* :mod:`hashlib`: :ref:`all constructors take a "usedforsecurity" keyword-only
1413
argument disabling known insecure and blocked algorithms
1514
<hashlib-usedforsecurity>`

Doc/library/superseded.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ backwards compatibility. They have been superseded by other modules.
1212

1313
aifc.rst
1414
audioop.rst
15-
cgi.rst
16-
cgitb.rst
1715
chunk.rst
1816
crypt.rst
1917
imghdr.rst

Doc/whatsnew/2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ Module changes
10301030

10311031
Lots of improvements and bugfixes were made to Python's extensive standard
10321032
library; some of the affected modules include :mod:`readline`,
1033-
:mod:`ConfigParser`, :mod:`cgi`, :mod:`calendar`, :mod:`posix`, :mod:`readline`,
1033+
:mod:`ConfigParser`, :mod:`!cgi`, :mod:`calendar`, :mod:`posix`, :mod:`readline`,
10341034
:mod:`xmllib`, :mod:`aifc`, :mod:`chunk, wave`, :mod:`random`, :mod:`shelve`,
10351035
and :mod:`nntplib`. Consult the CVS logs for the exact patch-by-patch details.
10361036

Doc/whatsnew/2.6.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,15 +1805,15 @@ changes, or look through the Subversion logs for all the details.
18051805
available, instead of restricting itself to protocol 1.
18061806
(Contributed by W. Barnes.)
18071807

1808-
* The :mod:`cgi` module will now read variables from the query string
1808+
* The :mod:`!cgi` module will now read variables from the query string
18091809
of an HTTP POST request. This makes it possible to use form actions
18101810
with URLs that include query strings such as
18111811
"/cgi-bin/add.py?category=1". (Contributed by Alexandre Fiori and
18121812
Nubis; :issue:`1817`.)
18131813

18141814
The :func:`parse_qs` and :func:`parse_qsl` functions have been
1815-
relocated from the :mod:`cgi` module to the :mod:`urlparse` module.
1816-
The versions still available in the :mod:`cgi` module will
1815+
relocated from the :mod:`!cgi` module to the :mod:`urlparse` module.
1816+
The versions still available in the :mod:`!cgi` module will
18171817
trigger :exc:`PendingDeprecationWarning` messages in 2.6
18181818
(:issue:`600362`).
18191819

Doc/whatsnew/3.10.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ query parameter separators in :func:`urllib.parse.parse_qs` and
15081508
:func:`urllib.parse.parse_qsl`. Due to security concerns, and to conform with
15091509
newer W3C recommendations, this has been changed to allow only a single
15101510
separator key, with ``&`` as the default. This change also affects
1511-
:func:`cgi.parse` and :func:`cgi.parse_multipart` as they use the affected
1511+
:func:`!cgi.parse` and :func:`!cgi.parse_multipart` as they use the affected
15121512
functions internally. For more details, please see their respective
15131513
documentation.
15141514
(Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)

Doc/whatsnew/3.11.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,9 +1735,9 @@ Modules
17351735
+---------------------+---------------------+---------------------+---------------------+---------------------+
17361736
| :mod:`audioop` | :mod:`crypt` | :mod:`nis` | :mod:`sndhdr` | :mod:`uu` |
17371737
+---------------------+---------------------+---------------------+---------------------+---------------------+
1738-
| :mod:`cgi` | :mod:`imghdr` | :mod:`nntplib` | :mod:`spwd` | :mod:`xdrlib` |
1738+
| :mod:`!cgi` | :mod:`imghdr` | :mod:`nntplib` | :mod:`spwd` | :mod:`xdrlib` |
17391739
+---------------------+---------------------+---------------------+---------------------+---------------------+
1740-
| :mod:`cgitb` | :mod:`mailcap` | :mod:`ossaudiodev` | :mod:`sunau` | |
1740+
| :mod:`!cgitb` | :mod:`mailcap` | :mod:`ossaudiodev` | :mod:`sunau` | |
17411741
+---------------------+---------------------+---------------------+---------------------+---------------------+
17421742

17431743
(Contributed by Brett Cannon in :issue:`47061` and Victor Stinner in

Doc/whatsnew/3.12.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,8 @@ Modules (see :pep:`594`):
805805

806806
* :mod:`aifc`
807807
* :mod:`audioop`
808-
* :mod:`cgi`
809-
* :mod:`cgitb`
808+
* :mod:`!cgi`
809+
* :mod:`!cgitb`
810810
* :mod:`chunk`
811811
* :mod:`crypt`
812812
* :mod:`imghdr`

Doc/whatsnew/3.13.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ Removed
118118
* Remove support for using :class:`pathlib.Path` objects as context managers.
119119
This functionality was deprecated and made a no-op in Python 3.9.
120120

121+
* :pep:`594`: Remove the :mod:`!cgi`` and :mod:`!cgitb` modules,
122+
deprecated in Python 3.11.
123+
(Contributed by Victor Stinner in :gh:`104773`.)
124+
125+
121126
Porting to Python 3.13
122127
======================
123128

0 commit comments

Comments
 (0)