From ee4fad50e714526ea313e5df7dd0584feff90d62 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 20 Jun 2024 15:12:16 -0400 Subject: [PATCH] fix: mark the C extension as safe for free-threading #1799 --- coverage/ctracer/module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coverage/ctracer/module.c b/coverage/ctracer/module.c index d564a8128..6a499fa44 100644 --- a/coverage/ctracer/module.c +++ b/coverage/ctracer/module.c @@ -31,6 +31,10 @@ PyInit_tracer(void) return NULL; } +#ifdef Py_GIL_DISABLED + PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED); +#endif + if (CTracer_intern_strings() < 0) { return NULL; }