Skip to content

gh-110864: Partially revert 110784, constraints cannot be NULL - #110922

Merged
JelleZijlstra merged 2 commits into
python:mainfrom
sobolevn:issue-110864-2
Oct 16, 2023
Merged

gh-110864: Partially revert 110784, constraints cannot be NULL#110922
JelleZijlstra merged 2 commits into
python:mainfrom
sobolevn:issue-110864-2

Conversation

@sobolevn

@sobolevnsobolevn commented Oct 16, 2023

Copy link
Copy Markdown
Member

I've also changed the exception message to be uppercase, like all others are.
Refs #110784
Refs #110868

@sobolevnsobolevn changed the title gh-110784: Partially revert gh-110784, constraints cannot be NULLgh-110784: Partially revert #110784, constraints cannot be NULLOct 16, 2023
@sobolevnsobolevn changed the title gh-110784: Partially revert #110784, constraints cannot be NULLgh-110784: Partially revert 110784, constraints cannot be NULLOct 16, 2023
@sobolevnsobolevn changed the title gh-110784: Partially revert 110784, constraints cannot be NULLgh-110864: Partially revert 110784, constraints cannot be NULLOct 16, 2023
Comment threadObjects/typevarobject.c Outdated
Py_XDECREF(bound);
return NULL;
}
if (!PyTuple_CheckExact(constraints)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we can actually turn this into an assert? If I understand correctly, AC should guarantee it's always a tuple.

@JelleZijlstra
JelleZijlstra enabled auto-merge (squash) October 16, 2023 14:34
@JelleZijlstra
JelleZijlstra merged commit 6a4528d into python:mainOct 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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@sobolevn@JelleZijlstra