X Tutup
Skip to content

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

Merged
Yhg1s merged 4 commits intopython:3.12from
miss-islington:backport-633ea21-3.12
Aug 20, 2023
Merged

[3.12] gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)#108134
Yhg1s merged 4 commits intopython:3.12from
miss-islington:backport-633ea21-3.12

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

X Tutup