Releases: tree-sitter/py-tree-sitter
Releases · tree-sitter/py-tree-sitter
v0.25.2
What's Changed
- ci: bump actions/download-artifact from 4 to 5 in the actions group by @dependabot[bot] in #401
- ci: bump actions/checkout from 4 to 5 in the actions group by @dependabot[bot] in #403
- build: bump tree_sitter/core from
3624198to629093dby @dependabot[bot] in #405 - build: properly detect MSVC compiler by @tree-sitter-ci-bot[bot] in #407
- ci: bump actions/upload-pages-artifact from 3 to 4 in the actions group by @dependabot[bot] in #404
- ci: bump actions/setup-python from 5 to 6 in the actions group by @dependabot[bot] in #411
- build: bump tree_sitter/core from
629093dtoa467ea8by @dependabot[bot] in #412 - fix(parser): fix memleak of source_view by @tree-sitter-ci-bot[bot] in #416
- build: bump tree_sitter/core from
a467ea8toda6fe9bby @dependabot[bot] in #417
Full Changelog: v0.25.1...v0.25.2
v0.25.1
What's Changed
- fix(docs): QueryCursor page was missing from index by @MisakaVan in #385
- fix: pattern_index parameter to generic predicates is incorrect by @davidt in #388
- docs(readme): update query usage examples by @TomJGooding in #390
- docs(query_cursor): fix missing space in hint by @TomJGooding in #391
- ci: bump pypa/cibuildwheel from 3.0 to 3.1 in the actions group by @dependabot[bot] in #392
- build: work around GCC optimizer bug for aarch64 by @tree-sitter-ci-bot[bot] in #393
- build: bump tree_sitter/core from
58edb3ato3624198by @dependabot[bot] in #397 - chore: release 0.25.1 by @tree-sitter-ci-bot[bot] in #398
- ci(pypi): disable free-threaded builds by @tree-sitter-ci-bot[bot] in #399
New Contributors
- @MisakaVan made their first contribution in #385
- @davidt made their first contribution in #388
- @TomJGooding made their first contribution in #390
- @tree-sitter-ci-bot[bot] made their first contribution in #393
Full Changelog: v0.25.0...v0.25.1
v0.25.0
Breaking changes are marked with !.
Additions:
Language.name(getter)Language.abi_version(getter)Language.semantic_version(getter)Language.supertypes(getter)Language.subtypes(supertype)Node.first_child_for_byte(byte)Node.first_named_child_for_byte(byte)Query.string_count(getter)Query.capture_name(index)Query.capture_quantifier(pattern_index, capture_index)Query.string_value(index)QueryCursor(query)QueryCursor.match_limit(getter, setter, deleter)QueryCursor.timeout_micros(getter, setter, deleter)QueryCursor.did_exceed_match_limit(getter)QueryCursor.set_max_start_depth(depth)QueryCursor.set_byte_range(start, end)QueryCursor.set_point_range(start, end)QueryCursor.captures(node, predicate, progress_callback)QueryCursor.matches(node, predicate, progress_callback)LookaheadIterator.names()LookaheadIterator.symbols()
Deprecations:
Language.version: useLanguage.abi_versionLanguage.query(source): useQuery(language, source)Parser.timeout_micros: use theprogress_callbackinparse()QueryCursor.timeout_micros: use theprogress_callbackinmatches()orcaptures()
Removals:
Node.child_containing_descendant(descendant): useNode.child_with_descendant(descendant)!Query.match_limit: moved toQueryCursor.match_limit!Query.set_match_limit(limit): moved toQueryCursor.match_limit!Query.did_exceed_match_limit: moved toQueryCursor.did_exceed_match_limit!Query.timeout_micros: moved toQueryCursor.timeout_micros!Query.set_timeout_micros(timeout): moved toQueryCursor.timeout_micros!Query.set_max_start_depth(depth): moved toQueryCursor.set_max_start_depth(depth)!Query.set_byte_range(byte_range): moved toQueryCursor.set_byte_range(start, end)!Query.set_point_range(point_range): moved toQueryCursor.set_point_range(start, end)!Query.captures(node, predicate): moved toQueryCursor.captures(node, predicate, progress_callback)!Query.matches(node, predicate): moved toQueryCursor.matches(node, predicate, progress_callback)!LookaheadIterator.iter_names(): useLookaheadIterator.names()!
Changes:
Parser.parse():encodingparameter also accepts"utf16le"&"utf16be"Parser.parse(): addedprogress_callbackparameterLookaheadIterator.__next__(): yieldstuple[int, str]!LookaheadIterator.reset(state, language): renamed fromreset_state!
v0.24.0
Breaking changes are marked with !.
Additions:
Language.copy()Language.node_kind_is_supertype(id)Language.__copy__()LogType(enum)Node.child_with_descendant(descendant)Node.field_name_for_named_child(descendant)Parser.print_dot_graphs(file)Parser.logger(getter + setter)Tree.copy()Tree.print_dot_graph(file)Tree.__copy__()
Deprecations:
Language(ptr: int)Node.child_containing_descendant(descendant): useNode.child_with_descendant(descendant)
v0.23.2
What's Changed
- Update documentation on
Query.captures()by @Bzero in #306 - build: bump tree_sitter/core from
46bdc14tof629fd4by @dependabot in #307 - fix(query): iterate over captures for the shortest size, not longest by @amaanq in #309
New Contributors
Full Changelog: v0.23.1...v0.23.2
v0.23.1
What's Changed
- build: bump tree_sitter/core from
12fb318toee06325by @dependabot in #286 - ci: bump pypa/cibuildwheel from 2.20 to 2.21 in the actions group by @dependabot in #291
Full Changelog: v0.23.0...v0.23.1
v0.23.0
Additions:
Node.child_containing_descendant(descendant)Tree.language(getter)Query.pattern_count(getter)Query.capture_count(getter)Query.match_limit(getter)Query.did_exceed_match_limit(getter)Query.set_match_limit(match_limit): returnsselfQuery.set_max_start_depth(max_start_depth): returnsselfQuery.set_byte_range(byte_range): returnsselfQuery.set_point_range(point_range): returnsselfQuery.disable_pattern(index): returnsselfQuery.disable_capture(capture): returnsselfQuery.pattern_settings(index)Query.pattern_assertions(index)Query.start_byte_for_pattern(index)Query.end_byte_for_pattern(index)Query.is_pattern_rooted(index)Query.is_pattern_non_local(index)Query.is_pattern_guaranteed_at_step(offset)QueryError(exception class)QueryPredicate(typing protocol)
Removals:
Parser.set_language(language)Parser.set_included_ranges(ranges)Parser.set_timeout_micros(timeout)Node.sexp()Tree.text()TreeCursor.goto_first_child_for_point(row, column)LookaheadIterator.reset(language, state)
Changes:
Language()accepts a capsule as an argument.Parser.parse(...)no longer accepts akeep_textargument.Query.captures(...)- Range arguments were removed (use
set_*instead). - Added an argument for custom query predicates.
- Return type was changed to
dict[str, list[Node]].
- Range arguments were removed (use
Query.matches(...)- Range arguments were removed (use
set_*instead). - Added an argument for custom query predicates.
- Return type was changed to
list[tuple[int, dict[str, list[Node]]]].
- Range arguments were removed (use
TreeCursor.goto_first_child_for_byte(byte)returnsint | None.TreeCursor.goto_first_child_for_point(point)returnsint | None.
v0.22.3
Full Changelog: v0.22.2...v0.22.3
v0.22.2
Full Changelog: v0.22.1...v0.22.2
v0.22.1
Full Changelog: v0.22.0...v0.22.1