typing_extensions icon indicating copy to clipboard operation
typing_extensions copied to clipboard

Backported and experimental type hints for Python

Results 49 typing_extensions issues
Sort by recently updated
recently updated
newest added

I now see why https://github.com/python/typing_extensions/pull/94 opted to avoid copying the whole function 😮‍💨 Fixes https://github.com/python/typing_extensions/issues/310. Although its unclear to me whether/how fully replicating `ForwardRef` might have downstream effects on things....

The expected parameters would help understand the situation better.

upstream first

`Required`/`NotRequired` aren't properly detected when `from __future__ import annotations` is used, leading to incorrect `__required_keys__`/`__optional_keys__` sets. Reproduced with 4.3.0. ```python from __future__ import annotations # comment this line out and...

Tests from python/cpython#122074. We don't have to use the base descriptor approach here because we find the annotations directly in the `__dict__` for the class, which avoids metaclass problems.

Would it be worth backporting https://github.com/python/cpython/issues/114053 for Python 3.12.0 - 3.12.3? /CC @AlexWaygood

We've fixed a number of issues with our PEP-696 backport in recent days, and we're now a lot closer to CPython's implementation on Python 3.13. We're still missing 5 specialisation-related...

bug

Addresses - https://github.com/python/typing_extensions/issues/469 As @JelleZijlstra [mentioned](https://github.com/python/typing_extensions/pull/449#discussion_r1773747048) that GenericAlias can be used to address #469. `GenericAlias` seems promising, however I am not sure what greater underlying changes this swap could maybe...

Fixes #448 that usage of ParamSpec with TypeAliasType was limited for < Python 3.11 This PR enables `TypeAliasType` to use Ellipsis and list arguments for `ParamSpec` type params.

Fixes #110 for Python 3.9-3.10: An Ellipsis cannot be used with `Concatenate` as last parameter must be a `ParamSpec` in Python 3.11 this is allowed, Python 3.10 does not support...