Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-110782: Fix crash when TypeVar is constructed with keyword args #110784

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Oct 12, 2023

@@ -554,6 +554,12 @@ def test_many_weakrefs(self):
vals[x] = cls(str(x))
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 bug and 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