gh-126016: Remove bad assertion in `PyThreadState_Clear` (GH-139158)
In the _interpreters module, we use PyEval_EvalCode() to run Python code in another interpreter. However, when the process receives a KeyboardInterrupt, PyEval_EvalCode() will jump straight to finalization rather than returning. This prevents us from cleaning up and marking the thread as "not running main", which triggers an assertion in PyThreadState_Clear() on debug builds. Since everything else works as intended, remove that assertion.
P
Peter Bierma committed
9243a4b93397f04237a5112011ee03433eda0462
Parent: e3d9bd6
Committed by GitHub <[email protected]>
on 9/19/2025, 12:17:05 PM