Skip to content

Commit 99622fb

Browse files
committed
FIx race
1 parent 63261de commit 99622fb

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/test/test_external_inspection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import sys
66
import socket
77
import threading
8-
import time
98
from asyncio import staggered, taskgroups, base_events, tasks
109
from unittest.mock import ANY
1110
from test.support import os_helper, SHORT_TIMEOUT, busy_retry, requires_gil_enabled

Modules/_remote_debugging_module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,6 +2537,14 @@ _remote_debugging_RemoteUnwinder___init___impl(RemoteUnwinderObject *self,
25372537
return -1;
25382538
}
25392539

2540+
#ifdef Py_GIL_DISABLED
2541+
if (only_active_thread) {
2542+
PyErr_SetString(PyExc_ValueError,
2543+
"only_active_thread is not supported when Py_GIL_DISABLED is not defined");
2544+
return -1;
2545+
}
2546+
#endif
2547+
25402548
self->debug = debug;
25412549
self->only_active_thread = only_active_thread;
25422550
self->cached_state = NULL;

0 commit comments

Comments
 (0)