Closed cdce8p closed 2 months 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
I'm going to close this for now, as I don't think we have any plans to work on this considering that we think it would be quite involved to implement. However, we do now have typing_extensions.get_annotations()
, which does similar things to typing.get_type_hints()
without some of the... questionable behaviour that get_type_hints
must maintain for backwards compatibility purposes :-)
(And I'd still be happy to review a PR if you can see a way to backport it in a non-horrible way!)
Would it be worth backporting https://github.com/python/cpython/issues/114053 for Python 3.12.0 - 3.12.3? /CC @AlexWaygood