Skip to content

Unify type alias deferral logic - #22015

Merged
ilevkivskyi merged 2 commits into
python:masterfrom
ilevkivskyi:fix-alias-defer
Sep 21, 2026
Merged

ilevkivskyi merged 2 commits into
python:masterfrom
ilevkivskyi:fix-alias-defer

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #21741
Closes #21873

Today may be a big day, fingers crossed :-) I think this may be the last piece of the puzzle in making deferral logic uniform across all kinds of special forms.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Excellent!

@luantaraschi

Copy link
Copy Markdown

Ran the TypedDict shape from #21741 (the test case in #21873) against this branch: it passes here and still crashes on master with the final-iteration assertion, so this covers that path as well. Fine by me to close #21873 in favour of this.

@ilevkivskyi
ilevkivskyi merged commit 0b6f1b7 into python:master Sep 21, 2026
25 checks passed
@ilevkivskyi
ilevkivskyi deleted the fix-alias-defer branch September 21, 2026 23:09
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.

[2.2 regression] Internal mypy error related to circular imports and TypedDict

3 participants