-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
ForwardRef.evaluate() mishandles type_params #137226
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesrelease-blockerstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesrelease-blockerstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done
Bug report
Bug description:
The implementation of
annotationlib.ForwardRef.evaluatehandles itstype_paramsargument in a complex yet incorrect way. Fixing this unfortunately leads to some test failures intyping.get_type_hints()because it does additional confusing things to the globals and locals. Still, I think we should fix the behavior of the new public.evaluate()method.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs