Skip to content

Fix crash on non-nomralized parameters expansion - #22123

Open
ilevkivskyi wants to merge 1 commit into
python:masterfrom
ilevkivskyi:fix-params-norm
Open

ilevkivskyi wants to merge 1 commit into
python:masterfrom
ilevkivskyi:fix-params-norm

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #21778

Fix by itself trivial: Parameters require the same level of care as CallableType when expanding. However, we have already a bunch of code duplication between two, and this PR would have added another ~80 lines of duplicated code, so I decided to refactor all shared logic into a separate base class.

I verified that this causes no visible slow-down on self-check (compiled, -n0):

master                    3.989s (0.0%) | stdev 0.012s 
fix-params-norm           3.975s (-0.4%) | stdev 0.011s

cc @JukkaL

@github-actions

github-actions Bot commented Oct 6, 2026

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

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.

Crash with variadic type variable

1 participant