Skip to content

Commit

Permalink
Support Python 3.13 (#104)
Browse files Browse the repository at this point in the history
* fix Python grammar to compile under Python 3.13

* update Python classifiers and add 3.13 to CI
  • Loading branch information
dfremont authored Oct 16, 2024
1 parent dc7543e commit 26d533d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8','3.9','3.10', '3.11', '3.12']
python-version: ['3.8','3.9','3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
Expand Down
2 changes: 1 addition & 1 deletion data/python.gram
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,7 @@ invalid_while_stmt[NoReturn]:
)
}
invalid_for_stmt[NoReturn]:
| [ASYNC] 'for' star_targets 'in' star_expressions NEWLINE { self.raise_syntax_error("expected ':'") }
| ['async'] 'for' star_targets 'in' star_expressions NEWLINE { self.raise_syntax_error("expected ':'") }
| ['async'] a='for' star_targets 'in' star_expressions ':' NEWLINE !INDENT {
self.raise_indentation_error(
f"expected an indented block after 'for' statement on line {a.start[0]}"
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
]
keywords = ["parser", "CPython", "PEG", "pegen"]
Expand Down

0 comments on commit 26d533d

Please sign in to comment.