Skip to content

gh-146075: Prevent crash in functools.partial() from malformed str subclass#146078

Merged
encukou merged 3 commits intopython:mainfrom
bkap123:partial-contains
Mar 18, 2026
Merged

gh-146075: Prevent crash in functools.partial() from malformed str subclass#146078
encukou merged 3 commits intopython:mainfrom
bkap123:partial-contains

Conversation

@bkap123
Copy link
Contributor

@bkap123 bkap123 commented Mar 17, 2026

In partial_vectorcall, an error returned by PyDict_Contains was considered to be a truthy value. Now, the error is handled appropriately.

In `partial_vectorcall`, an error returned by `PyDict_Contains` was
considered to be a truthy value. Now, the error is handled
appropriately.
@StanFromIreland StanFromIreland changed the title gh-146075: Prevent crash from malformed str subclass gh-146075: Prevent crash in functools.partial() from malformed str subclass Mar 17, 2026
Copy link
Member

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

LGTM

Test failures look unrelated.

@encukou encukou merged commit 6486211 into python:main Mar 18, 2026
93 of 99 checks passed
@bkap123 bkap123 deleted the partial-contains branch March 18, 2026 13:49
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