]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 19 Aug 2023 11:51:03 +0000 (14:51 +0300)
committerGitHub <noreply@github.com>
Sat, 19 Aug 2023 11:51:03 +0000 (14:51 +0300)
commit633ea217a85f6b6ba5bdbc73094254d5811b3485
treec33fba2ad466d260ebdce2e743ca6df9e28a3152
parent79db9d9a0e8f51ad4ea5caae31d7ae4b29985271
gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)

Such C API functions as PyErr_SetString(), PyErr_Format(),
PyErr_SetFromErrnoWithFilename() and many others no longer crash or
ignore errors if it failed to format the error message or decode the
filename. Instead, they keep a corresponding error.
Lib/test/test_capi/test_exceptions.py
Misc/NEWS.d/next/C API/2023-08-13-12-33-00.gh-issue-107915.jQ0wOi.rst [new file with mode: 0644]
Modules/_testcapi/clinic/exceptions.c.h
Modules/_testcapi/exceptions.c
Python/errors.c