From 9dc7a79692c6df979d327a361667107be20e4abf Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Sat, 11 Jan 2025 22:48:07 +0100 Subject: [PATCH] Move GIl manipulation right after module creation So that it also affects objects created at module loading time. This seems to fix #2271 --- pythran/cxxgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythran/cxxgen.py b/pythran/cxxgen.py index 8b8bc6a02..83b9432c4 100644 --- a/pythran/cxxgen.py +++ b/pythran/cxxgen.py @@ -721,6 +721,7 @@ def __str__(self): PyObject* theModule = PyModule_Create(&moduledef); if(! theModule) return theModule; + {freethreading} PyObject * theDoc = Py_BuildValue("(ss)", "{version}", "{hash}"); @@ -731,7 +732,6 @@ def __str__(self): theDoc); {extraobjects} - {freethreading} return theModule; }} '''.format(name=self.name,