Skip to content

annotationlib: namespace can be non-dict #132426

Closed
@eliegoudout

Description

@eliegoudout

Hello!

I think the following, made so that get_annotate_function is usable in metaclasses' __new__, should check for Mapping since __prepare__ can provide any mapping (see picture from PEP3115.

if isinstance(obj, dict):

Image

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesstdlibPython modules in the Lib dirtopic-typingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions