Skip to content

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