Skip to content

bpo-41515: Fix KeyError raised in get_type_hints#25352

Merged
gvanrossum merged 3 commits into
python:masterfrom
tirkarthi:bpo41515
Apr 12, 2021
Merged

bpo-41515: Fix KeyError raised in get_type_hints#25352
gvanrossum merged 3 commits into
python:masterfrom
tirkarthi:bpo41515

Conversation

@tirkarthi

@tirkarthi tirkarthi commented Apr 12, 2021

Copy link
Copy Markdown
Member

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

https://bugs.python.org/issue41515

efahl added 2 commits April 12, 2021 05:54
typing.get_type_hints raises KeyError on synthetic modules that don't appear in sys.modules.

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

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 :).

Comment thread Misc/NEWS.d/next/Library/2021-04-12-06-01-10.bpo-41515.YaVReb.rst Outdated
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
@gvanrossum

Copy link
Copy Markdown
Member

Thanks! I'll merge when tests pass.

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.

6 participants