Skip to content

[3.15] gh-155752: Do not crash when GenericAlias parameters change during substitution (GH-155761) - #155770

Merged
hugovk merged 1 commit into
python:3.15from
miss-islington:backport-c0006fa-3.15
Aug 14, 2026
Merged

[3.15] gh-155752: Do not crash when GenericAlias parameters change during substitution (GH-155761)#155770
hugovk merged 1 commit into
python:3.15from
miss-islington:backport-c0006fa-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

An alias argument can gain typing_subst after parameters has been cached, including during a preparation or substitution callback. Check that the argument is present before indexing the substitution arguments.
(cherry picked from commit c0006fa)

Co-authored-by: Darius Houle dariushoule@gmail.com

…ing substitution (pythonGH-155761)

An alias argument can gain __typing_subst__ after __parameters__ has been cached, including during a preparation or substitution callback. Check that the argument is present before indexing the substitution arguments.
(cherry picked from commit c0006faf4f48f01126a8a0752da8f159142e410d)

Co-authored-by: Darius Houle <dariushoule@gmail.com>
@python-cla-bot

python-cla-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@JelleZijlstra

Copy link
Copy Markdown
Member

@dariushoule could you sign the CLA again? Seems like this commit got associated with a different email. See https://devguide.python.org/getting-started/pull-request-lifecycle/#why-do-i-need-to-sign-the-cla-again

@picnixz could you approve this backport (since you already approved the original PR)? I'd like to get this in during the RC phase since it fixes a crash.

@hugovk
hugovk enabled auto-merge (squash) August 14, 2026 08:53
@hugovk
hugovk merged commit b8a9987 into python:3.15 Aug 14, 2026
60 checks passed
@miss-islington
miss-islington deleted the backport-c0006fa-3.15 branch August 14, 2026 08:55
@dariushoule

Copy link
Copy Markdown
Contributor

@JelleZijlstra sure thing, done, my mistake!

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.

5 participants