Skip to content
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

bpo-41515: Fix KeyError raised in get_type_hints #25352

Merged
merged 3 commits into from Apr 12, 2021

Conversation

tirkarthi
Copy link
Member

@tirkarthi tirkarthi commented Apr 12, 2021

typing.get_type_hints raises KeyError on synthetic modules that don't appear in sys.modules.

https://bugs.python.org/issue41515

typing.get_type_hints raises KeyError on synthetic modules that don't appear in sys.modules.
Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! I've been eyeing this issue for a while now and I agree with what you said on bpo about more errors with annotations becoming the default. Hopefully with this fix, the transition to 3.10 will be smoother :).

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
@gvanrossum
Copy link
Member

Thanks! I'll merge when tests pass.

@gvanrossum gvanrossum merged commit a9cf69d into python:master Apr 12, 2021
kreathon pushed a commit to kreathon/cpython that referenced this pull request May 2, 2021
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: efahl <36704995+efahl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants