Fix python free-threading compatibility#226
Fix python free-threading compatibility#226kevmo314 wants to merge 1 commit intotree-sitter:masterfrom
Conversation
|
I don't know anything about this area of Python but this looks like an improvement that would be applicable to Python bindings of all tree-sitter grammars, so it would probably be worth submitting the change to tree-sitter itself (since those bindings are generated by tree-sitter). |
That makes sense, looking into it seems like the binding generator in tree-sitter is already updated: https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/src/init.rs How do the bindings in this package get regenerated? |
Whenever the maintainers feel like doing so, which I wouldn't count on being done soon (grammars in this org rarely attract the attention of their maintainers) |
Add support for Python 3.13+ free-threaded builds (PEP 703).
The stable ABI (
Py_LIMITED_API) is not compatible with free-threaded python because the limited API headers don't include atomic operations required for thread-safe reference counting, see https://docs.python.org/3/c-api/stable.html. This change disables the stable ABI for free-threaded builds.