-
-
Notifications
You must be signed in to change notification settings - Fork 403
Description
As of Python 3.14, the free-threaded build is no longer considered experimental. See the what's new. CFFI 2.0, which came out this week and I helped getting out the door, added support for the free-threaded build. That release unblocked building pygit2 on the free-threaded build and fixed #1367.
It looks like pygit2 is not thread-safe: #1004.
That's fine IMO - it just needs to be clearly documented as such. You should still ship free-threaded builds of pygit2 for the same reason you ship builds on the GIL-enabled build. The GIL doesn't do anything to protect you from misuses of libgit2, as the above issue illustrates.
If you're interested in improving the thread safety of the library I can offer some suggestions.
See https://py-free-threading.github.io/ for more about free-threaded Python, including a guide for porting extensions.
If you're open to it, an easy first step would be to add free-threaded 3.14t to the testing matrix. I could do that along with updating the tests to use 3.14 instead of 3.13.