tree-sitter / py-tree-sitter

Python bindings to the Tree-sitter parsing library
https://tree-sitter.github.io/py-tree-sitter/
MIT License
817 stars 96 forks source link

Deprecation warning `Language.build_library is deprecated. Use the new bindings instead` #225

Closed kevinlu1248 closed 5 months ago

kevinlu1248 commented 5 months ago

I'm getting FutureWarning: Language.build_library is deprecated. Use the new bindings instead. warn("{} is deprecated. Use {} instead.".format(old, new), FutureWarning), but I'm not sure where I can find the new bindings.

amaanq commented 5 months ago

they should be auto generated when running tree-sitter generate in the bindings/python dir. If they're one of the upstream grammars, you can install (most) of them with pip install tree-sitter-LANG

kevinlu1248 commented 5 months ago

Where are the docs for this? @amaanq

amaanq commented 5 months ago

did you look at the readme..? https://github.com/tree-sitter/py-tree-sitter?tab=readme-ov-file#install-languages

and if you mean for a grammar repo you've authored/are building from locally, https://tree-sitter.github.io/tree-sitter/creating-parsers mentions the files auto-generated (yes these docs are not great for now)

kevinlu1248 commented 5 months ago

Oh I see it now, I was using tree-sitter-languages so I got confused, thanks!