Skip to content

test(python): improve bindings test to detect ABI incompatibilities#4555

Merged
ObserverOfTime merged 1 commit intotree-sitter:masterfrom
rmuir:python_test_parser
Jul 25, 2025
Merged

test(python): improve bindings test to detect ABI incompatibilities#4555
ObserverOfTime merged 1 commit intotree-sitter:masterfrom
rmuir:python_test_parser

Conversation

@rmuir
Copy link
Contributor

@rmuir rmuir commented Jul 3, 2025

Previously, python bindings test would not detect ABI incompatibilities. At this time, the latest pypi release of py-tree-sitter does not support 15, which is the default, and it creates the problem.

Improve the test to create a Parser, which will detect it:

======================================================================
ERROR: test_can_load_grammar
----------------------------------------------------------------------
Traceback (most recent call last):
  File "../tests/test_binding.py", line 10, in test_can_load_grammar
    _ = Parser(language)
ValueError: Incompatible Language version 15. Must be between 13 and 14

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

Previously, the test would not detect ABI incompatibilities.
@ObserverOfTime ObserverOfTime merged commit 8c61bbd into tree-sitter:master Jul 25, 2025
19 checks passed
@tree-sitter-ci-bot
Copy link

Successfully created backport PR for release-0.25:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants