Skip to content

Commit 508d769

Browse files
miss-islingtonvstinner
authored andcommitted
bpo-33612: Remove PyThreadState_Clear() assertion (GH-7069) (GH-7074)
bpo-25612, bpo-33612: Remove an assertion from PyThreadState_Clear() which failed at Python shutdown or on fork if a thread was running a generator. (cherry picked from commit b6dccf5) Co-authored-by: Victor Stinner <[email protected]>
1 parent 2fc443c commit 508d769

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Python/pystate.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@ PyThreadState_Clear(PyThreadState *tstate)
581581
Py_CLEAR(tstate->exc_state.exc_traceback);
582582

583583
/* The stack of exception states should contain just this thread. */
584-
assert(tstate->exc_info->previous_item == NULL);
585584
if (Py_VerboseFlag && tstate->exc_info != &tstate->exc_state) {
586585
fprintf(stderr,
587586
"PyThreadState_Clear: warning: thread still has a generator\n");

0 commit comments

Comments
 (0)