Skip to content

Commit

Permalink
Add support for Python 3.13 (#328)
Browse files Browse the repository at this point in the history
* fixes for Python 3.13

* allow newer manifold3d versions as the API has stabilized

* bump version number
  • Loading branch information
dfremont authored Feb 14, 2025
1 parent 394f205 commit f6bb62a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
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

0 comments on commit f6bb62a

Please sign in to comment.