Tree-sitter

Latest version: v0.23.2

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

0.22.0

_Breaking changes are marked with `!`._

Additions:

- `LANGUAGE_VERSION`
- `MIN_COMPATIBLE_LANGUAGE_VERSION`
- `Point(row, column)`
- `Language.__repr__()`
- `Language.__eq__()`: checks `ptr`
- `Language.__int__()`: returns `ptr`
- `Language.__index__()`: returns `ptr`
- `Language.__hash__()`: returns `ptr`
- `Node.__str__()`: returns the S-expression
- `TreeCursor.goto_first_child_for_point(point)`
- `TreeCursor.__copy__()`: returns `copy()`
- `Query(language, source)`
- `Parser(language, included_ranges, timeout_micros)`
- `Parser.language` (getter + setter)
- `Parser.included_ranges` (getter + setter)
- `Parser.timeout_micros` (getter + setter)
- `Range.__hash__()`

Deprecations:

- `Node.sexp()`: use `str()`
- `Tree.text`: use `root_node.text`
- `TreeCursor.goto_first_child_for_point(row, column)`: use `goto_first_child_for_point(point)`
- `LookaheadIterator.reset(language, state)`: use `reset_state(state, language)`
- `Parser.set_language(language)`: use `Parser(language)` or `language` setter
- `Parser.set_included_ranges(ranges)`: use `included_ranges` setter
- `Parser.set_timeout_micros(timeout)`: use `timeout_micros` setter

Removals:

- `Language(path, name)` **!**
- `Language.build_library(...)` **!**
- `Language.name` **!**
- `Language.lib`
- `Language.language_id`: use `int()`

Changes:

- `Language()` only accepts a single integer argument. **!**
- `Parser.parse(...)` accepts an optional `encoding` argument. **!**
- `TreeCursor.descendant_index` is changed to a property. **!**
- `LookaheadIterator.language` returns a `Language` instance. **!**
- `LookaheadIterator.reset_state(...)` accepts an optional `language` argument.
- `Query.captures(...)` arguments must be keywords (except for `node`).
- `Query.matches(...)` arguments must be keywords (except for `node`).
- `Range.__repr__()` prints attributes in the same order as the `Range()` arguments.
- `Range()` arguments are no longer considered optional.

0.21.3

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.21.2...v0.21.3

0.21.2

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.21.1...v0.21.2

0.21.1

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.21.0...v0.21.1

0.21.0

What's Changed
* Fix type of Tree.text property by jhandley in https://github.com/tree-sitter/py-tree-sitter/pull/176
* fix: typo by Thabokani in https://github.com/tree-sitter/py-tree-sitter/pull/185
* ci: add dependabot by dundargoc in https://github.com/tree-sitter/py-tree-sitter/pull/190
* ci: make dependabot group updates in single PR by dundargoc in https://github.com/tree-sitter/py-tree-sitter/pull/194
* ci: bump the actions group with 3 updates by dependabot in https://github.com/tree-sitter/py-tree-sitter/pull/195
* get_children_by_field_id and get_children_by_field_name returns empty list on invalid argument by wstevick in https://github.com/tree-sitter/py-tree-sitter/pull/180
* Prepare for bindings PR, add Query.matches by amaanq in https://github.com/tree-sitter/py-tree-sitter/pull/159
* ci: major overhaul by ObserverOfTime in https://github.com/tree-sitter/py-tree-sitter/pull/198
* Make match captures a dict[str,Node|list[Node]] by jhandley in https://github.com/tree-sitter/py-tree-sitter/pull/165
* docs: update readme by ObserverOfTime in https://github.com/tree-sitter/py-tree-sitter/pull/201

New Contributors
* Thabokani made their first contribution in https://github.com/tree-sitter/py-tree-sitter/pull/185
* dundargoc made their first contribution in https://github.com/tree-sitter/py-tree-sitter/pull/190
* dependabot made their first contribution in https://github.com/tree-sitter/py-tree-sitter/pull/195
* wstevick made their first contribution in https://github.com/tree-sitter/py-tree-sitter/pull/180
* ObserverOfTime made their first contribution in https://github.com/tree-sitter/py-tree-sitter/pull/198

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.20.4...v0.21.0

0.20.4

**Full Changelog**: https://github.com/tree-sitter/py-tree-sitter/compare/v0.20.3...v0.20.4

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.