-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
C API: Report ignored exception in C API functions which ignore all errors #106672
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
Labels
Comments
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Jul 12, 2023
Functions which indiscriminately ignore all errors now report them as unraisable errors.
This was referenced Aug 26, 2023
serhiy-storchaka
added a commit
that referenced
this issue
Nov 7, 2023
Functions which indiscriminately ignore all errors now report them as unraisable errors.
hugovk
pushed a commit
to hugovk/cpython
that referenced
this issue
Nov 8, 2023
…nGH-106674) Functions which indiscriminately ignore all errors now report them as unraisable errors.
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
…nGH-106674) Functions which indiscriminately ignore all errors now report them as unraisable errors.
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
…nGH-106674) Functions which indiscriminately ignore all errors now report them as unraisable errors.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some C API functions, like
PyDict_GetItem()
andPyObject_HasAttr()
(see capi-workgroup/problems#51 for full list), clears all errors which occurred during execution of these functions. The user has no way to distinguish the normal negative result from error.There is no way to fix such C API. But at least we can make ignoring errors less unnoticeable. The proposed PR adds
_PyErr_WriteUnraisableMsg()
when an unrelated error is ignored. It is the same way as reporting errors during object destruction.Linked PRs
The text was updated successfully, but these errors were encountered: