Skip to content

addinfourl headers are of type email.message.Message #3344

@mthuurne

Description

@mthuurne

Currently the headers field of urllib.response.addinfourl, which is also returned by the info() method, is annotated as having type Mapping[str, str]. However, in practice and in the documentation, it has the type email.message.Message. While that is a mapping, it has a lot of extra methods as well.

Note that headers and info() are actually defined on the addinfo base class of addinfourl, but addinfo is never instantiated itself except by the unit test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions