Skip to content

Conversation

@moreal
Copy link
Contributor

@moreal moreal commented Jan 13, 2026

Overview

This pull request resolves several causes of the cron-ci workflow's continued failures. It briefly includes the following items. You may also refer to the commit messages.

  • Python version upgrade
  • Using the ssl-rustls feature instead of the ssl feature
  • Replacement of inspect.getargspec (completely removed in 3.11) with inspect.getfullargspec
  • Replacement of test.libregrtest.runtest (whose structure changed in 3.11) with test.libregrtest.findtests

This PR doesn't fully resolve the issue yet, and there are still areas where RustPython's implementation needs further improvement.


Test

You can check the execution results at the link below (private repository workflow run link). It is expected that it hasn't been uploaded to the website yet.

https://github.com/moreal/RustPython/actions/runs/20972165461

Since 2b6e112 (#6724), the cron-ci workflow run also in pull request.

image

You can compare it with the recent workflow run results from upstream (RustPython/RustPython).

https://github.com/RustPython/RustPython/actions/runs/20869340999

Summary by CodeRabbit

  • Chores

    • Updated CI workflow configuration to adjust SSL feature dependencies and code coverage tracking.
    • Modified Python version handling in benchmark builds to use environment variables.
  • Tests

    • Updated test utilities to use current Python introspection methods.
    • Corrected import paths in test modules.

✏️ Tip: You can customize this high-level summary in your review settings.

moreal and others added 4 commits January 14, 2026 04:29
When the `extra_tests/jsontests.py` script was added, it was presumably during
the time when Python versions 3.5 to 3.8 were in use. At that time,
`test.libregrtest.runtest` was a valid path, but from CPython version 3.11
onwards, the path changed to `test.libregrtest.findtests`.
Replace the ssl feature with ssl-rustls in both the CARGO_ARGS
environment variable and the cargo-llvm-cov test command to fix
the cron-ci workflow.

Since 1a783fc, it is disallowed
to use ssl manually.
…_test_runner

inspect.getargspec() was removed in Python 3.11, causing jsontests.py to
fail with "TypeError: 'NoneType' object is not iterable" when running on
RustPython (which targets Python 3.13).

The get_function_args() function was silently catching the AttributeError
and returning None, which then caused the error in store_class_fields()
when trying to iterate over None.

> https://docs.python.org/3/whatsnew/3.11.html
> The getargspec() function, deprecated since Python 3.0; use
> inspect.signature() or inspect.getfullargspec() instead.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

CI workflow updated to use ssl-rustls and make Python version configurable; code coverage exclusions extended. Two test utilities updated: one replaces inspect.getargspec with inspect.getfullargspec, the other fixes an import path for findtests.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
​.github/workflows/cron-ci.yaml
Swap CARGO_ARGS feature sslssl-rustls (keep jit); add coverage exclusions (rustpython-compiler-source, rustpython-venvlauncher); conditionally skip certain upload steps on pull_request; make benchmark Python version read from PYTHON_VERSION env
Test Utilities
extra_tests/custom_text_test_runner.py, extra_tests/jsontests.py
Replace inspect.getargspec() with inspect.getfullargspec() (exclude self unchanged); change import from test.libregrtest.runtest.findtests to test.libregrtest.findtests.findtests (import path corrected)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • youknowone
  • ShaharNaveh

Poem

🐰 I hopped through YAML, swapped ssl for rustls bright,
Env vars steer Python now by gentle light,
Old inspect retired, fullspec takes the lead,
Imports fixed—our tests proceed with speed,
A tiny rabbit cheers this tidy flight ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Fix some parts of cron-ci workflow' is vague and generic, using non-descriptive language that doesn't convey the specific changes made (Python version upgrade, ssl-rustls feature switch, inspect/test module updates). Consider a more specific title that highlights the primary fixes, such as 'Update cron-ci workflow for Python 3.11+ compatibility' or list the key changes more explicitly.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@moreal moreal changed the title Fix cron-ci workflow Fix some parts of cron-ci workflow Jan 13, 2026
Since rustpython-venvlauncher is Windows-only,
it disables the project in the cron-ci workflow.
@youknowone youknowone added skip:ci Skip running the ci and removed skip:ci Skip running the ci labels Jan 14, 2026
@moreal moreal marked this pull request as ready for review January 14, 2026 00:56
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/cron-ci.yaml (1)

96-100: Change ssl to ssl-rustls on line 98 for consistency with the environment configuration.

The CARGO_ARGS environment variable specifies ssl-rustls, but line 98 passes --features "ssl,sqlite" to the script. Since whats_left.py passes these features directly to cargo, it should use ssl-rustls to match the rest of the workflow.

🧹 Nitpick comments (1)
.github/workflows/cron-ci.yaml (1)

14-15: Consider using CARGO_ARGS or removing it.

CARGO_ARGS is defined but never referenced. The features are hardcoded in line 35, creating duplication. If CARGO_ARGS is updated, line 35 won't reflect the change.

♻️ Suggestion: Use the env var in cargo commands
      - name: Run cargo-llvm-cov with Rust tests.
-        run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --verbose --no-default-features --features stdlib,importlib,encodings,ssl-rustls,jit
+        run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --exclude rustpython-compiler-source --exclude rustpython-venvlauncher --verbose ${{ env.CARGO_ARGS }}

Alternatively, remove CARGO_ARGS if it's not intended to be shared across steps.

Also applies to: 34-35

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 801113c and 2b6e112.

📒 Files selected for processing (1)
  • .github/workflows/cron-ci.yaml
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: Applies to Lib/** : In the `Lib/` directory, when modifications are necessary, add a `# TODO: RUSTPYTHON` comment or use `unittest.skip('TODO: RustPython <reason>')` or `unittest.expectedFailure` with `# TODO: RUSTPYTHON <reason>` comment

Applied to files:

  • .github/workflows/cron-ci.yaml
📚 Learning: 2025-09-28T22:22:55.921Z
Learnt from: reactive-firewall
Repo: RustPython/RustPython PR: 6176
File: .github/workflows/Check_Tests.yml:133-141
Timestamp: 2025-09-28T22:22:55.921Z
Learning: In the RustPython project's CI-5974-Test-RustPython-Integration action, the override-rustpython-path input is marked as required but has runtime fallback logic that defaults to RUSTPYTHONPATH environment variable or "Lib" if neither is provided, making explicit specification unnecessary in most cases.

Applied to files:

  • .github/workflows/cron-ci.yaml
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: When modifying bytecode instructions, perform a full clean build by running `rm -r target/debug/build/rustpython-* && find . | grep -E '\.pyc$' | xargs rm -r`

Applied to files:

  • .github/workflows/cron-ci.yaml
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: When testing Python code, always use RustPython instead of the standard `python` command; use `cargo run -- script.py` or `cargo run` for interactive REPL

Applied to files:

  • .github/workflows/cron-ci.yaml
📚 Learning: 2025-12-27T14:03:49.034Z
Learnt from: CR
Repo: RustPython/RustPython PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-27T14:03:49.034Z
Learning: Applies to **/*.rs : Always run clippy to lint code (`cargo clippy`) before completing tasks and fix any warnings or lints introduced by changes

Applied to files:

  • .github/workflows/cron-ci.yaml
📚 Learning: 2025-08-09T22:56:24.527Z
Learnt from: jackoconnordev
Repo: RustPython/RustPython PR: 6086
File: benches/microbenchmarks/sort.py:1-3
Timestamp: 2025-08-09T22:56:24.527Z
Learning: In RustPython's microbenchmarks (benches/microbenchmarks/*.py), the variable `ITERATIONS` is intentionally used without being defined in the Python files. It is injected by the cargo bench harness at runtime. This pattern should be maintained for consistency across all microbenchmarks, and F821 lint warnings for undefined `ITERATIONS` are expected and acceptable in this context.

Applied to files:

  • .github/workflows/cron-ci.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Run snippets and cpython tests (ubuntu-latest)
  • GitHub Check: Run snippets and cpython tests (macos-latest)
  • GitHub Check: Ensure compilation on various targets
  • GitHub Check: Run snippets and cpython tests on wasm-wasi
  • GitHub Check: Run rust tests (windows-2025)
  • GitHub Check: Run rust tests (ubuntu-latest)
  • GitHub Check: Run snippets and cpython tests (windows-2025)
  • GitHub Check: Check Rust code with clippy
  • GitHub Check: Run rust tests (macos-latest)
  • GitHub Check: Check the WASM package and demo
  • GitHub Check: Collect regression test data
  • GitHub Check: Collect code coverage data
  • GitHub Check: Collect benchmark data
  • GitHub Check: Collect what is left data
🔇 Additional comments (6)
.github/workflows/cron-ci.yaml (6)

8-10: LGTM!

Good addition of the pull_request trigger. This allows testing the workflow changes without waiting for the scheduled run or manual dispatch.


44-48: LGTM!

Correct use of conditional to skip the codecov upload during pull request events. This prevents unnecessary uploads and potential issues with secrets access.


64-68: LGTM!

Correctly guards the upload step to prevent deploying test data during PR events.


101-105: LGTM!

Properly guards the website upload step for PR events.


148-150: LGTM!

Good refactor to use the centralized PYTHON_VERSION environment variable instead of a hardcoded value.


170-174: LGTM!

Correctly guards the benchmark data upload for PR events.

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@youknowone youknowone merged commit 6cb763a into RustPython:main Jan 14, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants