mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-129354: Use PyErr_FormatUnraisable() function (#129435)
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
This commit is contained in:
parent
5ab9604683
commit
4e47e05045
9 changed files with 21 additions and 15 deletions
|
|
@ -1042,7 +1042,7 @@ PyObject_ClearWeakRefs(PyObject *object)
|
|||
PyObject *tuple = PyTuple_New(num_weakrefs * 2);
|
||||
if (tuple == NULL) {
|
||||
_PyWeakref_ClearWeakRefsNoCallbacks(object);
|
||||
PyErr_WriteUnraisable(NULL);
|
||||
PyErr_FormatUnraisable("Exception ignored when clearing object weakrefs");
|
||||
PyErr_SetRaisedException(exc);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue