fix: bump tree-sitter to v0.25.0

Bump tree-sitter to v0.25.0 and fix breaking change where
`Query.captures` has been moved to `QueryCursor.captures`.

NB: tree-sitter dropped support for Python 3.9 back in v0.24.0, so
syntax highlighting in Textual will now require Python >=3.10.

Fixes #5976
This commit is contained in:
TomJGooding
2025-07-21 11:09:01 +01:00
parent fba1597a18
commit cc61b23ea8
3 changed files with 84 additions and 95 deletions

View File

@@ -52,24 +52,24 @@ typing-extensions = "^4.4.0"
platformdirs = ">=3.6.0,<5"
# start of [syntax] extras
# Require tree-sitter >= 0.23.0 and python >= 3.9
# Require tree-sitter >= 0.25.0 and python >= 3.10
# Windows, MacOS and Linux binary wheels are available for all of the languages below.
tree-sitter = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-python = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-markdown = { version = ">=0.3.0", optional = true, python = ">=3.9"}
tree-sitter-json = { version = ">=0.24.0", optional = true, python = ">=3.9" }
tree-sitter-toml = { version = ">=0.6.0", optional = true, python = ">=3.9" }
tree-sitter-yaml = { version = ">=0.6.0", optional = true, python = ">=3.9" }
tree-sitter-html = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-css = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-javascript = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-rust = { version = ">=0.23.0,<=0.23.2", optional = true, python = ">=3.9" }
tree-sitter-go = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-regex = { version = ">=0.24.0", optional = true, python = ">=3.9" }
tree-sitter-xml = { version = ">=0.7.0", optional = true, python = ">=3.9" }
tree-sitter-sql = { version = ">=0.3.0,<0.3.8", optional = true, python = ">=3.9" }
tree-sitter-java = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter-bash = { version = ">=0.23.0", optional = true, python = ">=3.9" }
tree-sitter = { version = ">=0.25.0", optional = true, python = ">=3.10" }
tree-sitter-python = { version = ">=0.23.0", optional = true, python = ">=3.10" }
tree-sitter-markdown = { version = ">=0.3.0", optional = true, python = ">=3.10"}
tree-sitter-json = { version = ">=0.24.0", optional = true, python = ">=3.10" }
tree-sitter-toml = { version = ">=0.6.0", optional = true, python = ">=3.10" }
tree-sitter-yaml = { version = ">=0.6.0", optional = true, python = ">=3.10" }
tree-sitter-html = { version = ">=0.23.0", optional = true, python = ">=3.10" }
tree-sitter-css = { version = ">=0.23.0", optional = true, python = ">=3.10" }
tree-sitter-javascript = { version = ">=0.23.0", optional = true, python = ">=3.10" }
tree-sitter-rust = { version = ">=0.23.0,<=0.23.2", optional = true, python = ">=3.10" }
tree-sitter-go = { version = ">=0.23.0", optional = true, python = ">=3.10" }
tree-sitter-regex = { version = ">=0.24.0", optional = true, python = ">=3.10" }
tree-sitter-xml = { version = ">=0.7.0", optional = true, python = ">=3.10" }
tree-sitter-sql = { version = ">=0.3.0,<0.3.8", optional = true, python = ">=3.10" }
tree-sitter-java = { version = ">=0.23.0", optional = true, python = ">=3.10" }
tree-sitter-bash = { version = ">=0.23.0", optional = true, python = ">=3.10" }
# end of [syntax] extras
pygments = "^2.19.2"