Skip to content

Commit

Permalink
fixes for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
dfremont committed Oct 24, 2024
1 parent 0abbbcd commit 461822e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
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 461822e

Please sign in to comment.