Visitar URL original
gh-96385: Correctly raise error on `[*T, *V]` substitution by sobolevn · Pull Request #96386 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20260102121036/https://github.com/python/cpython/pull/96386
Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Aug 29, 2022 •

I think that this was the original intent.

The path is now fully covered:
Снимок экрана 2022-08-29 в 15 32 10

params = alias.__parameters__
typevartuple_index = params.index(self)
for param in enumerate(params[typevartuple_index + 1:]):
for param in params[typevartuple_index + 1:]:
Copy link
Member

Choose a reason for hiding this comment

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

Oh wow this code was just broken. :-)

@gvanrossum
Copy link
Member

Since this is an outright bug maybe it should be backported? (Possibly not in 3.11.0, it's not important enough to disturb RC2, but definitely in 3.11.1.)

Also, pinging @serhiy-storchaka as the original author (AFAICT).

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Good catch!

@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes type-bug An unexpected behavior, bug, or error labels Aug 30, 2022
@serhiy-storchaka serhiy-storchaka merged commit 7517735 into python:main Aug 30, 2022
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 30, 2022
…honGH-96386)

(cherry picked from commit 7517735)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 30, 2022
@bedevere-bot
Copy link

GH-96407 is a backport of this pull request to the 3.11 branch.

pablogsal pushed a commit that referenced this pull request Aug 30, 2022
…#96407)

(cherry picked from commit 7517735)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants