[3.13] gh-140306: Clear uncaught exception info after applying error in subinterpreter (GH-140397)

This commit is contained in:
Shamil 2026-01-12 19:19:57 +03:00 committed by GitHub
parent 8b7ebbb432
commit ab8224697a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1692,6 +1692,7 @@ _PyXI_ApplyCapturedException(_PyXI_session *session)
assert(session->error != NULL);
PyObject *res = _PyXI_ApplyError(session->error);
assert((res == NULL) != (PyErr_Occurred() == NULL));
_PyXI_excinfo_Clear(&session->error->uncaught);
session->error = NULL;
return res;
}