Skip to content

FYI: cgi module is deprecated in Python 3.11, will be removed in 3.13 #914

@exoosh

Description

@exoosh

Source for the information: https://docs.python.org/3/library/cgi.html

cgi — Common Gateway Interface support

Source code: Lib/cgi.py

Deprecated since version 3.11, will be removed in version 3.13: The cgi module is deprecated (see PEP 594 for details and alternatives).

cgi.parse_multipart() is currently used in input_format.py, for example.

As a side note, this use also causes issues if you are trying to upload several GiB of data through a POST. The documentation for the method says:

This is easy to use but not much good if you are expecting megabytes to be uploaded — in that case, use the FieldStorage class instead which is much more flexible.

For hug the best option seems to be to use email.message instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions