Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TypedDict.__annotations__ is empty with Python 3.14 beta 1 #593

Closed
@pekkaklarck

Description

@pekkaklarck
Python 3.14.0b1 (main, May  8 2025, 08:57:13) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from typing_extensions import TypedDict
>>> 
>>> class XY(TypedDict):
...     x: int
...     y: int
...     
>>> XY.__annotations__
{}
>>> 
>>> from typing import TypedDict
>>> 
>>> class XY(TypedDict):
...     x: int
...     y: int
...     
>>> XY.__annotations__
{'x': <class 'int'>, 'y': <class 'int'>}
>>> 

Tested with typing_extensions v4.13.2. There are no problems with earlier Python versions nor were there with Python 3.14 alphas that I tested.

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