-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
gh-137226: Fix behavior of ForwardRef.evaluate with type_params #137227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The previous behavior was copied from earlier typing code. It works around the way typing.get_type_hints passes its namespaces, but I don't think the behavior is logical or correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a domain expert but this seems correct, if kludgy, to me. (To be honest, it's not more of a kludge than the old implementation.)
Thanks for reviewing! I think the annotationlib code is less kludgy; the typing code is more kludgy but that's for compatibility with old |
Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…pythonGH-137227) The previous behavior was copied from earlier typing code. It works around the way typing.get_type_hints passes its namespaces, but I don't think the behavior is logical or correct. (cherry picked from commit 089a324) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
GH-137709 is a backport of this pull request to the 3.14 branch. |
The previous behavior was copied from earlier typing code. It works around the way
typing.get_type_hints passes its namespaces, but I don't think the behavior is logical
or correct.