]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-146075: Prevent crash in `functools.partial()` from malformed `str` subclass ...
authorbkap123 <97006829+bkap123@users.noreply.github.com>
Wed, 18 Mar 2026 12:46:01 +0000 (08:46 -0400)
committerGitHub <noreply@github.com>
Wed, 18 Mar 2026 12:46:01 +0000 (13:46 +0100)
commit64862112b7beb005523e7bca15c59c78c5319e58
treeeeecd6864b870b03f7968225b66e77add8f1d929
parentdfde59f0e18648f874ab9d41774b6be03d66f6a7
gh-146075: Prevent crash in `functools.partial()` from malformed `str` subclass (GH-146078)

In `partial_vectorcall`, an error returned by `PyDict_Contains` was
considered to be a truthy value. Now, the error is handled
appropriately.
Lib/test/test_functools.py
Misc/NEWS.d/next/Library/2026-03-17-19-30-45.gh-issue-146075.85sCSh.rst [new file with mode: 0644]
Modules/_functoolsmodule.c