mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-129354: Use PyErr_FormatUnraisable() function (#129511)
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
This commit is contained in:
parent
c3ae5c9e4a
commit
0373926260
5 changed files with 40 additions and 35 deletions
|
@ -1735,7 +1735,9 @@ unicode_dealloc(PyObject *unicode)
|
|||
PyObject *popped;
|
||||
int r = PyDict_Pop(interned, unicode, &popped);
|
||||
if (r == -1) {
|
||||
PyErr_WriteUnraisable(unicode);
|
||||
PyErr_FormatUnraisable("Exception ignored while "
|
||||
"removing an interned string %R",
|
||||
unicode);
|
||||
// We don't know what happened to the string. It's probably
|
||||
// best to leak it:
|
||||
// - if it was popped, there are no more references to it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue