Merged
Conversation
Member
Author
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
ChrisFloofyKitsune
approved these changes
Mar 9, 2025
Contributor
|
In my opinion, methods that in C return iterator structs should in Python return simple Lists of values. It will likely be more efficient, because crossing the Python to C border is expensive. It’s also simpler from an API perspective. |
Member
Author
|
@maxbrunsfeld Can I have admin rights to this repo (like the Java and Kotlin ones) so I can actually merge PRs? |
Prateikx
reviewed
Apr 13, 2025
Prateikx
reviewed
Apr 13, 2025
Prateikx
reviewed
Apr 13, 2025
Prateikx
reviewed
Apr 13, 2025
Prateikx
reviewed
Apr 13, 2025
Prateikx
reviewed
Apr 13, 2025
Prateikx
reviewed
Apr 13, 2025
Member
Author
This comment was marked as resolved.
This comment was marked as resolved.
Closed
2 tasks
Member
Author
haxtibal
added a commit
to haxtibal/tree-sitter-robot
that referenced
this pull request
May 1, 2025
On publish, the pypi workflow currently regenerates our parser for ABI 15 because that's the default from the central workflow [1]. In Python, one needs py-tree-sitter [2] to load the robot language. Since py-tree-sitter folks have not yet finished ABI 15 migration, there's currently no way to load our binding. Using the lattest py-tree-sitter 0.24 would fail with "ValueError: Incompatible Language version 15. Must be between 13 and 14". Therefore to make tree-sitter-robot available for users, we enforce ABI 14 on regeneration for upload. PS: Some of the central language bindings have basically the same problem. However, since they have published former pypi releases with lower ABI versions, there's something users can fallback to. We don't have previous releases, so no fallback is available. [1] https://github.com/tree-sitter/workflows/blob/ec44bc4f4667a458dd397ed9864f1b560e8fdca2/.github/workflows/package-pypi.yml#L24 [2] https://github.com/tree-sitter/py-tree-sitter [3] tree-sitter/py-tree-sitter#333
haxtibal
added a commit
to haxtibal/tree-sitter-robot
that referenced
this pull request
May 1, 2025
On publish, the pypi workflow currently regenerates our parser for ABI 15 because that's the default from the central workflow [1]. In Python, one needs py-tree-sitter [2] to load the robot language. Since py-tree-sitter folks have not yet finished ABI 15 migration [3], there's currently no way to load our binding. Using the lattest py-tree-sitter 0.24 would fail with "ValueError: Incompatible Language version 15. Must be between 13 and 14". Therefore to make tree-sitter-robot available for users, we enforce ABI 14 on regeneration for upload. PS: Some of the central language bindings have basically the same problem. However, since they have published former pypi releases with lower ABI versions, there's something users can fallback to. We don't have previous releases, so no fallback is available. [1] https://github.com/tree-sitter/workflows/blob/ec44bc4f4667a458dd397ed9864f1b560e8fdca2/.github/workflows/package-pypi.yml#L24 [2] https://github.com/tree-sitter/py-tree-sitter [3] tree-sitter/py-tree-sitter#333
watermarkhu
approved these changes
May 29, 2025
|
@maxbrunsfeld @amaanq Please could someone merge this? Python projects are currently stuck using older versions of some grammars due to the language version conflict. Thanks! 🙂 |
Contributor
|
Thanks @ObserverOfTime; nice work. sorry for the delay. It's a really big diff, but it all makes sense AFAICT. |
Member
Author
|
Thanks @maxbrunsfeld. Now can I have write access so I can merge other PRs? :) |
This was referenced Jul 10, 2025
TomJGooding
added a commit
to TomJGooding/textual
that referenced
this pull request
Jul 15, 2025
Fix breaking change in tree-sitter v0.25.0 where `Query.captures` has been moved to `QueryCursor.captures`. Related PR: tree-sitter/py-tree-sitter#333
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!