Skip to content

Fix crash on class using itself as a type variable - #22219

Merged
ilevkivskyi merged 2 commits into
python:masterfrom
ilevkivskyi:fix-req-gen
Oct 19, 2026
Merged

ilevkivskyi merged 2 commits into
python:masterfrom
ilevkivskyi:fix-req-gen

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #21549

Fix is straightforward. New syntax test added just in case for completeness.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

@ilevkivskyi
ilevkivskyi merged commit 58a63c9 into python:master Oct 19, 2026
25 checks passed
@ilevkivskyi
ilevkivskyi deleted the fix-req-gen branch October 19, 2026 13:40
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: Must not defer during final iteration with recursive class definition

2 participants