Skip to content

Commit

Permalink
PEP 594: mention how to replace (Mini)FieldStorage (#2306)
Browse files Browse the repository at this point in the history
cjwatson authored Feb 8, 2022
1 parent c3baa73 commit ddeb1d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pep-0594.rst
Original file line number Diff line number Diff line change
@@ -338,7 +338,11 @@ related to executing code are:
- ``parse`` with ``urllib.parse.parse_qs`` (``parse`` is just a wrapper)
- ``parse_header`` with ``email.message.Message`` (see example below)
- ``parse_multipart`` with ``email.message.Message`` (same MIME RFCs)
- ``FieldStorage``/``MiniFieldStorage`` has no direct replacement
- ``FieldStorage``/``MiniFieldStorage`` has no direct replacement, but can
typically be replaced by using `multipart
<https://pypi.org/project/multipart/>`_ (for ``POST`` and ``PUT``
requests) or ``urllib.parse.parse_qsl`` (for ``GET`` and ``HEAD``
requests)
- ``valid_boundary`` (undocumented) with ``re.compile("^[ -~]{0,200}[!-~]$")``

As an explicit example of how close ``parse_header`` and

0 comments on commit ddeb1d8

Please sign in to comment.