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

Add test case for missing TypedDict TypeVar scope frame #13764

Conversation

Michael0x2a
Copy link
Collaborator

This is a small follow-up to #13678 and #13755.

In the former diff, I added a TypeVar scope frame around TypedDict creation. However, I had really no good reason for doing this at the time: I wasn't able to find a bug due to the missing frame and added it purely speculatively, out of a desire for symmetry.

It turns out this missing frame does legitimately cause some issues, which were reported in the latter.

So, this diff encodes one of the reported bugs as a test case to make sure we don't regress.

This is a small follow-up to python#13678 and python#13755.

In the former diff, I added a TypeVar scope frame around
TypedDict creation. However, I had really no good reason for
doing this at the time: I wasn't able to find a bug due to
the missing frame and added it purely speculatively, out of a
desire for symmetry.

It turns out this missing frame does legitimately cause
some issues, which were reported in the latter.

So, this diff encodes one of the reported bugs as a test
case to make sure we don't regress.
@hauntsaninja hauntsaninja merged commit 053ff27 into python:master Sep 30, 2022
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.

3 participants