@@ -10,28 +10,8 @@ It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after
10
10
being deprecated in Python 3.11. The removal was decided in :pep: `594 `.
11
11
12
12
A fork of the module on PyPI can be used instead: :pypi: `legacy-cgi `.
13
+ This is a copy of the cgi module, no longer maintained or supported by the core
14
+ Python team.
13
15
14
- If you want to update your code using supported standard library modules:
15
-
16
- * ``cgi.FieldStorage `` can typically be replaced with
17
- :func: `urllib.parse.parse_qsl ` for ``GET `` and ``HEAD `` requests, and the
18
- :mod: `email.message ` module or :pypi: `multipart ` PyPI project for ``POST ``
19
- and ``PUT ``.
20
-
21
- * ``cgi.parse() `` can be replaced by calling :func: `urllib.parse.parse_qs `
22
- directly on the desired query string, except for ``multipart/form-data ``
23
- input, which can be handled as described for ``cgi.parse_multipart() ``.
24
-
25
- * ``cgi.parse_multipart() `` can be replaced with the functionality in the
26
- :mod: `email ` package (e.g. :class: `email.message.EmailMessage ` and
27
- :class: `email.message.Message `) which implements the same MIME RFCs, or
28
- with the :pypi: `multipart ` PyPI project.
29
-
30
- * ``cgi.parse_header() `` can be replaced with the functionality in the
31
- :mod: `email ` package, which implements the same MIME RFCs. For example,
32
- with :class: `email.message.EmailMessage `::
33
-
34
- from email.message import EmailMessage
35
- msg = EmailMessage()
36
- msg['content-type'] = 'application/json; charset="utf8"'
37
- main, params = msg.get_content_type(), msg['content-type'].params
16
+ The last version of Python that provided the :mod: `!cgi ` module was
17
+ `Python 3.12 <https://docs.python.org/3.12/library/cgi.html >`_.
0 commit comments