Update dependency-injector to run safely without the GIL
Opened this issue · 1 comments
When running this library in a Python 3.13 project, I get the following warning:
<frozen importlib._bootstrap>:488: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'dependency_injector.containers', 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
I am fairly new to Python library development so I am not sure how I can help here.
I am fairly new to Python library development so I am not sure how I can help here.
Adding free-threding support would be non-trivial task. Cython starting v3.1 has some basic free-threading support, you can try experimenting with that. But either way, even if it builds and runs - there are brand new world of concurrency issues to solve. For sure there would be some issues around wiring, most likely something will pop out around longer-lived providers (singletons, resources). Should I mention we'll need some tests for multithreaded use case?
There are plenty of work to do. As free-threding matures, we'll get there eventually. No ETA from my side atm.