You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an error happens in the callback or in converting result of the callback, it is handled by calling PyErr_FormatUnraisable(). If an error happens in preparing arguments for the callback, it is handled in different way -- some message is printed to stderr and then PyErr_Print() is called. In one case the error is not properly handled.
It is better to handle all errors in the uniform way. PyErr_Print() is not suitable for it because it treats SystemExit specially and has a side effect of setting sys.last_exc` and other variables.
Activity
pythongh-129502: Fix handling errors in ctypes callbacks
gh-129502: Fix handling errors in ctypes callbacks (GH-129504)
pythongh-129502: Fix handling errors in ctypes callbacks (pythonGH-12…
[3.13] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (…
[3.12] pythongh-129502: Fix handling errors in ctypes callbacks (pyth…
[3.12] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (…
hugovk commentedon Feb 5, 2025
Triage: PR merged and backported. Please re-open if there's more to do.
pythongh-129502: Fix handling errors in ctypes callbacks (pythonGH-12…