Skip to content

fix: return PyCapsule for TSLanguage pointer instead of int - #141

Open
uguryavuz wants to merge 1 commit into
tlaplus-community:mainfrom
uguryavuz:main
Open

fix: return PyCapsule for TSLanguage pointer instead of int#141
uguryavuz wants to merge 1 commit into
tlaplus-community:mainfrom
uguryavuz:main

Conversation

@uguryavuz

Copy link
Copy Markdown

For the Python bindings of tree-sitter, int constructors for Language were deprecated with v0.24.0 of py-tree-sitter. With this change, _binding_language now returns a PyCapsule named "tree_sitter.Language" instead of a raw pointer as an integer, so the Language constructor can use it without warnings.

@ahelwer

ahelwer commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Are these changes to the python bindings auto-generated by upgrading the version of tree-sitter used to generate the grammar? If so that route is preferable.

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