4.13.0
New features:
- Add
typing_extensions.TypeFormfrom PEP 747. Patch by
Jelle Zijlstra. - Add
typing_extensions.get_annotations, a backport of
inspect.get_annotationsthat adds features specified
by PEP 649. Patches by Jelle Zijlstra and Alex Waygood. - Backport
evaluate_forward_reffrom CPython PR
#119891 to evaluateForwardRefs.
Patch by Daraan, backporting a CPython PR by Jelle Zijlstra.
Bugfixes and changed features:
- Update PEP 728 implementation to a newer version of the PEP. Patch by Jelle Zijlstra.
- Copy the coroutine status of functions and methods wrapped
with@typing_extensions.deprecated. Patch by Sebastian Rittau. - Fix bug where
TypeAliasTypeinstances could be subscripted even
where they were not generic. Patch by Daraan. - Fix bug where a subscripted
TypeAliasTypeinstance did not have all
attributes of the originalTypeAliasTypeinstance on older Python versions.
Patch by Daraan and Alex Waygood. - Fix bug where subscripted
TypeAliasTypeinstances (and some other
subscripted objects) had wrong parameters if they were directly
subscripted with anUnpackobject.
Patch by Daraan. - Backport to Python 3.10 the ability to substitute
...in genericCallable
aliases that have aConcatenatespecial form as their argument.
Patch by Daraan. - Extended the
Concatenatebackport for Python 3.8-3.10 to now accept
Ellipsisas an argument. Patch by Daraan. - Fix backport of
get_type_hintsto reflect Python 3.11+ behavior which does not add
Union[..., NoneType]to annotations that have aNonedefault value anymore.
This fixes wrapping ofAnnotatedin an unwantedOptionalin such cases.
Patch by Daraan. - Fix error in subscription of
Unpackaliases causing nested Unpacks
to not be resolved correctly. Patch by Daraan. - Backport CPython PR #124795:
fixTypeAliasTypenot raising an error on non-tuple inputs fortype_params.
Patch by Daraan. - Fix that lists and
...could not be used for parameter expressions forTypeAliasType
instances before Python 3.11.
Patch by Daraan. - Fix error on Python 3.10 when using
typing.Concatenateand
typing_extensions.Concatenatetogether. Patch by Daraan. - Backport of CPython PR #109544
to reflect Python 3.13+ behavior: A value assigned to__total__in the class body of a
TypedDictwill be overwritten by thetotalargument of theTypedDictconstructor.
Patch by Daraan, backporting a CPython PR by Jelle Zijlstra. isinstance(typing_extensions.Unpack[...], TypeVar)now evaluates toFalseon Python 3.11
and newer, but remainsTrueon versions before 3.11.
Patch by Daraan.