Skip to content

Conversation

@2bndy5
Copy link
Contributor

@2bndy5 2bndy5 commented Oct 12, 2025

This properly disables the GIL for free threaded python builds. Thanks to advice from @ngoldbaum

This patch simply gets pygit2 ready for use with Python 3.14t without warnings/errors.
All tests pass with Python v3.14t and python -c "import pygit2" completes without warnings.

I haven't done a through code review for spots (in src/*) where thread safety might be a concern.
My impression is that _pygit2 (when appropriate) invokes _libgit2 (which is compiled with cffi). So, I'm guessing most thread safety concerns are delegated to cffi.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Oct 13, 2025

I have another branch (2bndy5:test-with-cibuildwheel) that uses cibuildwheel to run unit tests on each built binary wheels. That branch is based on this branch, so my next PR depends on this PR.

@jdavid jdavid merged commit 628fe81 into libgit2:master Oct 13, 2025
8 checks passed
@2bndy5 2bndy5 deleted the free-thread-able branch October 13, 2025 09:25
@ngoldbaum
Copy link

Thanks for following up on this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants