KEMBAR78
gh-110782: Fix crash when TypeVar is constructed with keyword args by JelleZijlstra · Pull Request #110784 · python/cpython · GitHub
Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Oct 12, 2023

del vals

def test_constructor(self):
T = TypeVar(name="T")
Copy link
Member

Choose a reason for hiding this comment

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

I find this form offensive, but since we allowed it in 3.11 I guess we have to keep supporting it, and we can't just make it an error (not crashing of course). (It's especially weird since a type var with constraints requires the name to be positional.)

@AlexWaygood
Copy link
Member

The Windows x86 failures are caused by #110754, and are being tracked in #110767, and might be fixed by #110768

@JelleZijlstra JelleZijlstra merged commit d2a536b into python:main Oct 12, 2023
@miss-islington
Copy link
Contributor

Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@JelleZijlstra JelleZijlstra deleted the tvkw branch October 12, 2023 23:00
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 12, 2023
…rgs (pythonGH-110784)

(cherry picked from commit d2a536b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 12, 2023

GH-110787 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 12, 2023
JelleZijlstra added a commit that referenced this pull request Oct 12, 2023
…args (GH-110784) (#110787)

gh-110782: Fix crash when TypeVar is constructed with keyword args (GH-110784)
(cherry picked from commit d2a536b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
sobolevn added a commit to sobolevn/cpython that referenced this pull request Oct 16, 2023
JelleZijlstra pushed a commit that referenced this pull request Oct 16, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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.

4 participants