Skip to content

Conversation

@kevmo314
Copy link

@kevmo314 kevmo314 commented Jan 7, 2026

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.

@wetneb
Copy link

wetneb commented Jan 7, 2026

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).

@kevmo314
Copy link
Author

kevmo314 commented Jan 7, 2026

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?

@wetneb
Copy link

wetneb commented Jan 8, 2026

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)

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.

2 participants