From 81a031859fc5e91bc56e04d5b0674f2cd987638e Mon Sep 17 00:00:00 2001 From: Brent Westbrook Date: Fri, 4 Apr 2025 12:57:19 -0400 Subject: [PATCH] Run fuzzer with `--preview` Summary -- Updates `fuzz.py` to run with `--preview`, which should allow it to catch semantic syntax errors. Test Plan -- @AlexWaygood and I temporarily made any named expression a semantic syntax error and checked that this led to fuzzing errors. We also tested that reverting the `--preview` addition did not show any errors. We also ran the fuzzer on 500 seeds on `main` but didn't find any issues, (un)fortunately. --- python/py-fuzzer/fuzz.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/py-fuzzer/fuzz.py b/python/py-fuzzer/fuzz.py index 5cbf2b145f959..1028ca2d90622 100644 --- a/python/py-fuzzer/fuzz.py +++ b/python/py-fuzzer/fuzz.py @@ -71,6 +71,7 @@ def ruff_contains_bug(code: str, *, ruff_executable: Path) -> bool: "--no-cache", "--target-version", "py313", + "--preview", "-", ], capture_output=True,