From dac40a071a5c6be2e5495a26f2752a0871ddbb7e Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Sun, 11 Jan 2026 15:35:45 -0500 Subject: [PATCH 1/4] Make whats_left.py compile with same settings as before --- .github/workflows/ci.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b626503c5b4..d1f0b3427df 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -422,8 +422,14 @@ jobs: run: | target/release/rustpython -m venv testvenv testvenv/bin/rustpython -m pip install wheel - - name: Check whats_left is not broken - run: python -I scripts/whats_left.py + - if: runner.os != 'macOS' + name: Check whats_left is not broken + shell: bash + run: python -I scripts/whats_left.py --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading,jit" + - if: runner.os == 'macOS' # TODO fix jit on macOS + name: Check whats_left is not broken (macOS) + shell: bash + run: python -I scripts/whats_left.py --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading" # no jit on macOS for now lint: name: Check Rust code with clippy From c930055614e03d6b1c592e9e5f5272c9c9e0b27e Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Mon, 19 Jan 2026 21:39:37 -0500 Subject: [PATCH 2/4] Add --no-default-features to scripts/whats_left.py --- scripts/whats_left.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/scripts/whats_left.py b/scripts/whats_left.py index f2019ba4eb1..00db9a0ac5c 100755 --- a/scripts/whats_left.py +++ b/scripts/whats_left.py @@ -60,6 +60,11 @@ def parse_args(): action="store_true", help="print output as JSON (instead of line by line)", ) + parser.add_argument( + "--no-default-features", + action="store_true", + help="disable default features when building RustPython", + ) parser.add_argument( "--features", action="store", @@ -441,19 +446,23 @@ def remove_one_indent(s): f.write(output + "\n") -subprocess.run( - ["cargo", "build", "--release", f"--features={args.features}"], check=True -) +cargo_build_command = ["cargo", "build", "--release"] +if args.no_default_features: + cargo_build_command.append("--no-default-features") +if args.features: + cargo_build_command.extend(["--features", args.features]) + +subprocess.run(cargo_build_command, check=True) + +cargo_run_command = ["cargo", "run", "--release"] +if args.no_default_features: + cargo_run_command.append("--no-default-features") +if args.features: + cargo_run_command.extend(["--features", args.features]) +cargo_run_command.extend(["-q", "--", GENERATED_FILE]) + result = subprocess.run( - [ - "cargo", - "run", - "--release", - f"--features={args.features}", - "-q", - "--", - GENERATED_FILE, - ], + cargo_run_command, env={**os.environ.copy(), "RUSTPYTHONPATH": "Lib"}, text=True, capture_output=True, From 7b54963437c98af25dbf4efced64b19ae564d927 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Mon, 19 Jan 2026 21:40:44 -0500 Subject: [PATCH 3/4] Build RustPython with no default features --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d1f0b3427df..79c780c4f85 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -425,11 +425,11 @@ jobs: - if: runner.os != 'macOS' name: Check whats_left is not broken shell: bash - run: python -I scripts/whats_left.py --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading,jit" + run: python -I scripts/whats_left.py --no-default-features --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading,jit" - if: runner.os == 'macOS' # TODO fix jit on macOS name: Check whats_left is not broken (macOS) shell: bash - run: python -I scripts/whats_left.py --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading" # no jit on macOS for now + run: python -I scripts/whats_left.py --no-default-features --features "$(sed -e 's/--[^ ]*//g' <<< "${{ env.CARGO_ARGS }}" | tr -d '[:space:]'),threading" # no jit on macOS for now lint: name: Check Rust code with clippy From 2c9c72d584cafa5613b6ed58e32c1f7fb2561236 Mon Sep 17 00:00:00 2001 From: Padraic Fanning Date: Mon, 19 Jan 2026 23:04:32 -0500 Subject: [PATCH 4/4] Retrigger CI