diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a03de550681..35bffdd148f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -106,7 +106,7 @@ cargo run --release -- -m test test_unicode -k test_unicode_escape ### Determining What to Implement -Run `./whats_left.py` to get a list of unimplemented methods, which is helpful when looking for contribution opportunities. +Run `./scripts/whats_left.py` to get a list of unimplemented methods, which is helpful when looking for contribution opportunities. ## Coding Guidelines diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7fc4c653189..5b756e8af7e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -412,7 +412,7 @@ jobs: target/release/rustpython -m venv testvenv testvenv/bin/rustpython -m pip install wheel - name: Check whats_left is not broken - run: python -I whats_left.py + run: python -I scripts/whats_left.py lint: name: Check Rust code with clippy diff --git a/.github/workflows/cron-ci.yaml b/.github/workflows/cron-ci.yaml index 9d549602bc6..c942364064c 100644 --- a/.github/workflows/cron-ci.yaml +++ b/.github/workflows/cron-ci.yaml @@ -94,8 +94,8 @@ jobs: run: cargo build --release --verbose - name: Collect what is left data run: | - chmod +x ./whats_left.py - ./whats_left.py --features "ssl,sqlite" > whats_left.temp + chmod +x ./scripts/whats_left.py + ./scripts/whats_left.py --features "ssl,sqlite" > whats_left.temp env: RUSTPYTHONPATH: ${{ github.workspace }}/Lib - name: Upload data to the website diff --git a/README.md b/README.md index c4f7bfb1d60..6949c6e66e2 100644 --- a/README.md +++ b/README.md @@ -245,7 +245,7 @@ To enhance CPython compatibility, try to increase unittest coverage by checking Another approach is to checkout the source code: builtin functions and object methods are often the simplest and easiest way to contribute. -You can also simply run `python -I whats_left.py` to assist in finding any unimplemented +You can also simply run `python -I scripts/whats_left.py` to assist in finding any unimplemented method. ## Compiling to WebAssembly diff --git a/demo_closures.py b/demo_closures.py deleted file mode 100644 index 0ed673a94fd..00000000000 --- a/demo_closures.py +++ /dev/null @@ -1,12 +0,0 @@ -def foo(x): - def bar(z): - return z + x - - return bar - - -f = foo(9) -g = foo(10) - -print(f(2)) -print(g(2)) diff --git a/crawl_sourcecode.py b/scripts/crawl_sourcecode.py similarity index 100% rename from crawl_sourcecode.py rename to scripts/crawl_sourcecode.py diff --git a/whats_left.py b/scripts/whats_left.py similarity index 99% rename from whats_left.py rename to scripts/whats_left.py index 99b840f9da7..f2019ba4eb1 100755 --- a/whats_left.py +++ b/scripts/whats_left.py @@ -29,7 +29,7 @@ if not sys.flags.isolated: print("running without -I option.") - print("python -I whats_left.py") + print("python -I scripts/whats_left.py") exit(1) GENERATED_FILE = "extra_tests/not_impl.py" @@ -39,7 +39,7 @@ sys.exit(f"whats_left.py must be run under CPython, got {implementation} instead") if sys.version_info[:2] < (3, 14): sys.exit( - f"whats_left.py must be run under CPython 3.14 or newer, got {implementation} {sys.version} instead. If you have uv, try `uv run python -I whats_left.py` to select a proper Python interpreter easier." + f"whats_left.py must be run under CPython 3.14 or newer, got {implementation} {sys.version} instead. If you have uv, try `uv run python -I scripts/whats_left.py` to select a proper Python interpreter easier." )