Skip to content

Fix nested namedtuple crash in incremental mode #12803

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

Merged
merged 12 commits into from
May 17, 2022
Merged

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented May 17, 2022

Make sure the fullname of a named tuple defined within a method matches
the nesting of the definition in the symbol table. Otherwise we'll have a
crash during deserialization.

In particular, a named tuple defined within a method will now be always
stored in the symbol table of the surrounding class, instead of the global
symbol table. Previously there was an inconsistency between old-style
and new-style syntax.

Fix #10913.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 18a5107 into master May 17, 2022
@JukkaL JukkaL deleted the fix-namedtuple-crash branch May 17, 2022 14:46
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.

“AssertionError: Cannot find component” for local NamedTuple inside class method
2 participants