From ab8224697afc820dd6f13435e0ffd0ce2fac7c7b Mon Sep 17 00:00:00 2001 From: Shamil Date: Mon, 12 Jan 2026 19:19:57 +0300 Subject: [PATCH] [3.13] gh-140306: Clear uncaught exception info after applying error in subinterpreter (GH-140397) --- Python/crossinterp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/crossinterp.c b/Python/crossinterp.c index caa1cb6702b..d150c6e03c0 100644 --- a/Python/crossinterp.c +++ b/Python/crossinterp.c @@ -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; }