Open penguinland opened 1 month ago
This is actually related to https://github.com/cedricrupb/code_ast/pull/3 (which automatically installs the right version)
Ultimately, I would like to support the newer tree_sitter versions. Therefore, I am currently a bit hesitant to fix the tree_sitter version.
If you are interested, there is already development version of code_ast (which code_tokenize uses under the hood) which supports the newer version of tree_sitter. However, you would have to install the language bindings yourself.
Thanks so much! Not sure if I should close this ticket right now, or wait for that PR to be merged first. but I appreciate your work!
I installed this with
pip install code-tokenize
, but when I tried using it I got anAttributeError
becausetree_sitter.Language
has nobuild_library
:I think this is because tree-sitter removed
build_library
entirely in version 0.22, earlier this year. This repo requires tree_sitter 0.19.0, butpip
installed tree_sitter 0.23.1 instead.I got things to work by explicitly running
pip install tree_sitter==0.21.3
andpip install setuptools
, but I still get aFutureWarning
thatLanguage(path, name)
is deprecated.Is there a way to update PyPI so it installs compatible versions of
tree_sitter
andsetuptools
automatically? More broadly, I wonder whether this can be updated so it works with more recent versions of tree-sitter, without deprecation warnings.Thanks for taking a look, and please let me know if I can help more!