Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
I'm trying PyScan to guard against AI slop in my repo, and it is erroring when parsing one of my Python 3.14 files. Their FAQ says to come here when encountering parse errors.
The problem line in my code appears to be: except KeyError, TypeError, ValueError
which was included in Python 3.14 with PEP 758.
I know tree-sitter tries to support the newest version of Python. Is this covered somewhere already and I am simply using it incorrectly? I haven't found an issue covering this yet.
Steps To Reproduce/Bad Parse Tree
Attempt to parse a try/except block with multiple exceptions and no parentheses (ruff removes the parens).
try:
do_stuff()
except KeyError, TypeError, ValueError:
return None
Expected Behavior/Parse Tree
I expect this to parse the same as if the exceptions were gathered into a tuple with parens.
except (KeyError, TypeError, ValueError)
Repro
# Example code that causes the issue
def foo():
# Code that fails to parse, or causes an error
...
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version)No response
Describe the bug
I'm trying PyScan to guard against AI slop in my repo, and it is erroring when parsing one of my Python 3.14 files. Their FAQ says to come here when encountering parse errors.
The problem line in my code appears to be:
except KeyError, TypeError, ValueErrorwhich was included in Python 3.14 with PEP 758.
I know tree-sitter tries to support the newest version of Python. Is this covered somewhere already and I am simply using it incorrectly? I haven't found an issue covering this yet.
Steps To Reproduce/Bad Parse Tree
Attempt to parse a try/except block with multiple exceptions and no parentheses (ruff removes the parens).
Expected Behavior/Parse Tree
I expect this to parse the same as if the exceptions were gathered into a tuple with parens.
except (KeyError, TypeError, ValueError)Repro