python-libzim icon indicating copy to clipboard operation
python-libzim copied to clipboard

Enhance no GIL / free threaded support

Open benoit74 opened this issue 3 weeks ago • 0 comments

CPython now has free-threaded builds since 3.13: https://docs.python.org/3/howto/free-threading-python.html

In https://github.com/openzim/python-libzim/pull/237 (to be released as 3.8.0), we've fixed tests and documentation regarding the fact that python-libzim requires the GIL ATM.

We need to investigate if we really need the GIL, because multiple methods are already marked as nogil, especially important ones around the creation of the ZIM (where we do expect the python-libzim user to handle thread-safety when required).

Aim would be to mark the module as free-threaded. I don't know yet how to do this with Cython (if possible at all).

benoit74 avatar Nov 06 '25 08:11 benoit74