Enhance no GIL / free threaded support
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start with Python's free-threading documentation and the existing methods marked nogil. Investigate whether Cython can mark the module as free-threaded and whether the binding truly requires the GIL. Done means the module supports free-threaded builds safely, with the relevant tests and documentation updated.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Python
- Stars
- 109
- Forks
- 29
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openzim/python-libzim
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openzim/python-libzim#268 · 4 comments · 1 reaction ·
-
Release 3.14.0 Opentask
openzim/python-libzim#267 · 1 assignee ·
-
Code review: writer-path use-after-free, sys.modules corruption, GIL held across all reader I/O Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
openzim/python-libzim#266 ·
-
Build for ABI3 Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
openzim/python-libzim#264 · 1 comment ·
-
enhancement upstream
Difficulty 4/5 3-5 days Newbie friendliness 25/100
openzim/python-libzim#241 ·
All issues in openzim/python-libzim
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100