gh-129354: Use PyErr_FormatUnraisable() function (#129435)

Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
This commit is contained in:
Victor Stinner 2025-01-30 16:09:38 +01:00 committed by GitHub
parent 5ab9604683
commit 4e47e05045
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 21 additions and 15 deletions

View file

@ -1837,7 +1837,8 @@ _PyErr_CheckSignalsTstate(PyThreadState *tstate)
PyErr_Format(PyExc_OSError,
"Signal %i ignored due to race condition",
i);
PyErr_WriteUnraisable(Py_None);
PyErr_FormatUnraisable("Exception ignored when "
"calling signal handler");
continue;
}
PyObject *arglist = NULL;