You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make it compatible with Free Threading (aka no-gil) #297
Since Python 3.14 the no-gil feature is not experimental anymore but optional, when some of the dependencies are not marked that can run safely in those versions Python interpreter fallback to the default mode with GIL. This can impact when running on production but also when running tests:
<frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'grimp._rustgrimp', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.
It would be nice if this lib could be compatible with no-gil, if needed I can try to help!
importsysimportsysconfig# Just importing should be enough for the testimportgrimp# it should only run for Python 3.14t+deftest_ensure_disabled_gil():
assertsysconfig.get_config_var("Py_GIL_DISABLED") ==1:
assertsys._is_gil_enabled() isFalse
Activity
seddonym commentedon Jan 22, 2026
Thanks for the issue, I would like to support free threading but am not sure what is involved or how much work it is.
Any input on that welcome!
thepabloaguilar commentedon Jan 25, 2026
We may want to add a test like this later:
Source: Identifying free-threaded Python
thepabloaguilar commentedon Jan 25, 2026
Other interesting resources: