◐ Shell
clean mode source ↗

gh-146075: Prevent crash in `functools.partial()` from malformed `str` subclass by brijkapadia · Pull Request #146078 · python/cpython

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

skirpichev

kumaraditya303

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026
…d `str` subclass (pythonGH-146078)

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