[3.14] annotationlib - get_annotations
with Format.FORWARDREF
returns _Stringifier
instances instead of ForwardRef for module.type
annotations where the module is not loaded
#125614
Labels
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Tested on 3.14.0a1 - related to implementation of PEP 649 / PEP 749 - #119180
If a type uses dotted access but can't be evaluated,
get_annotations
returns_Stringifier
objects instead ofForwardRef
objects.Output:
I'd expect to see
ForwardRef('typing.Any')
here so this was surprising. I also found another bug related to dotted access but not related to Stringifiers that I'll raise separately.CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: