Skip to content

[3.12] gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918) #108134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 20, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 19, 2023

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.
(cherry picked from commit 633ea21)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…Err_Format() (pythonGH-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.
(cherry picked from commit 633ea21)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@Yhg1s
Copy link
Member

Yhg1s commented Aug 20, 2023

Can you take a look at the test failures, Serhiy?

@serhiy-storchaka
Copy link
Member

Fixed.

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.

Correctly handle errors in PyErr_Set*() functions
4 participants