-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Replace PyErr_WriteUnraisable()
with PyErr_FormatUnraisable()
#129354
Comments
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
I wrote a single big PR to show how the code can look like: PR gh-129359.
The drawback is that it changes |
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace "on verb+ing" with "when verb+ing".
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace "on verb+ing" with "while verb+ing".
Replace "on verb+ing" with "while verb+ing".
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update tests: * test_coroutines * test_exceptions * test_generators * test_struct
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update tests: * test_coroutines * test_exceptions * test_generators * test_struct
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update test_sqlite3 tests.
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update test_sqlite3 tests. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update tests: * test_coroutines * test_exceptions * test_generators * test_struct
The flaw of |
Right.
There is a red warning in the documentation about that: https://docs.python.org/dev/library/sys.html#sys.unraisablehook The default hook doesn't store exc_value nor object. |
Remove unused variables.
Remove unused variables.
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace "on verb+ing" with "while verb+ing".
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update test_sqlite3 tests. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update tests: * test_coroutines * test_exceptions * test_generators * test_struct
Remove unused variables.
Python 3.13 added
PyErr_FormatUnraisable(format, ...)
which allows logging a specific error message, whereasPyErr_WriteUnraisable()
always logs the generic "Exception ignored in ..." message.I propose to use replace
PyErr_WriteUnraisable()
withPyErr_FormatUnraisable()
to log better (more helpful) error messages.Linked PRs
The text was updated successfully, but these errors were encountered: