python / typing_extensions

Backported and experimental type hints for Python
Other
407 stars 104 forks source link

Add `typing.get_type_hints` backport #410

Open cdce8p opened 1 month ago

cdce8p commented 1 month ago

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

AlexWaygood commented 1 month ago

IIRC, backporting stuff that involves ForwardRef._evaluate() is pretty hard, because you end up having to copy a huge amount of typing internals into typing_extensions :(

So I'm not sure if it would be worth it just for the early 3.12 patch releases. But I'm definitely open to it if there's a way to do it that's not too fragile or complicated