Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.13 #328

Merged
merged 5 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scenic"
version = "3.0.0"
version = "3.1.0a1"
description = "The Scenic scenario description language."
authors = [
{ name = "Daniel Fremont" },
Expand Down Expand Up @@ -32,9 +32,9 @@ dependencies = [
"dotmap ~= 1.3",
"mapbox_earcut >= 0.12.10",
"matplotlib ~= 3.2",
"manifold3d == 2.3.0",
"manifold3d >= 2.5.1",
"networkx >= 2.6",
"numpy ~= 1.24",
"numpy >= 1.24",
"opencv-python ~= 4.5",
"pegen >= 0.3.0",
"pillow >= 9.1",
Expand Down
2 changes: 1 addition & 1 deletion src/scenic/syntax/scenic.gram
Original file line number Diff line number Diff line change
Expand Up @@ -2891,7 +2891,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
5 changes: 4 additions & 1 deletion tests/syntax/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,10 @@ def checkException(e, lines, program, bug, path, output, topLevel=True):
chained = bool(e.__cause__ or (e.__context__ and not e.__suppress_context__))
assert bool(remainingLines) == chained
if remainingLines:
mid = loc - 5 if topLevel else loc - 2
if topLevel:
mid = loc - 6 if sys.version_info >= (3, 13) else loc - 5
else:
mid = loc - 2
assert len(output) >= -(mid - 1)
if e.__cause__:
assert (
Expand Down
Loading