We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3d9bd6 commit 926e45dCopy full SHA for 926e45d
Python/pystate.c
@@ -1625,7 +1625,11 @@ PyThreadState_Clear(PyThreadState *tstate)
1625
{
1626
assert(tstate->_status.initialized && !tstate->_status.cleared);
1627
assert(current_fast_get()->interp == tstate->interp);
1628
- assert(!_PyThreadState_IsRunningMain(tstate));
+ // GH-126016: In the _interpreters module, KeyboardInterrupt exceptions
1629
+ // during PyEval_EvalCode() are sent to finalization, which doesn't let us
1630
+ // mark threads as "not running main". So, for now this assertion is
1631
+ // disabled.
1632
+ // XXX assert(!_PyThreadState_IsRunningMain(tstate));
1633
// XXX assert(!tstate->_status.bound || tstate->_status.unbound);
1634
tstate->_status.finalizing = 1; // just in case
1635
0 commit comments