Skip to content

Synchronize regression harness helpers with Python 3.15 - #9297

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:upgrade-py315-runner-helpers-20261022
Oct 22, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:upgrade-py315-runner-helpers-20261022

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Split the regression-harness support portion of #8954 into a focused canonical-library update.

Synchronize nine modules using scripts/update_lib from CPython 3.15.0, pinned to d220409a13b77de7a6c30abe16ea90db01528edc:

  • Update worker cleanup for OpenBSD getsid() permission handling and restore the Python SIGINT handler when inherited as ignored/default.
  • Preserve deprecated ByteString ABC registries during reference-leak cleanup.
  • Add the canonical bisection and coverage helper modules already referenced by the runner, and update the existing opt-in coverage command token.
  • Synchronize TSAN selections, cap implicit descriptor scanning, and recognize anonymous mmap2 calls in diagnostic filtering.

All nine resulting files match the pinned canonical source. No native code, test assertions, markers, snippets or CI workflow configuration changes.

The findtests.py package-splitting change stays out of this PR: its test_free_threading entry depends on a test family absent from this base. Existing discovery granularity, stack-limit adaptations and subprocess crash detection remain unchanged.

Validation

  • Configured applicable pre-commit hooks passed; canonical bytes remained unchanged.
  • All nine sources compiled with a sealed, source-bound RustPython binary built from the unchanged main base ad8bd18f341445761fc57b1080db6e6e8e0e10e7. Generated code was not executed or imported.
  • A fixed external observer passed once on CPython 3.15.0 and once on that RustPython binary: 12 command-vector, 16 fake worker-cleanup, 5 fake SIGINT and 13 pure memory-filter checks. It used hash-pinned extracted source fragments with fake OS/signal dependencies, not full-module integration tests.

These checks do not establish real OpenBSD process-group behavior, signal inheritance, reference-leak cleanup, TSAN, bisection, descriptor-boundary behavior or full regression-runner integration. Full workspace/CAPI test suites were not run locally; hosted CI remains required.

Parallel Python coverage is not implemented by this synchronization. -Xpresite remains an unsupported native capability on the tested RustPython base; its command token is only generated by the existing opt-in -T/--coverage path. Ordinary CI does not newly invoke it. No real coverage hook, process termination, signal registration, strace or subprocess-stress run was performed during local validation.

AI-assisted implementation and validation using OpenAI Codex.

Regenerate nine canonical modules using scripts/update_lib at CPython
3.15.0 d220409a13b77de7a6c30abe16ea90db01528edc. Keep the discovery
package split out until its missing test family is available.

AI-assisted source selection, synchronization, review and bounded
validation using OpenAI Codex. No native capability claims are added.

Assisted-by: Codex:unknown
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters: 9
  • Lib/test/bisect_cmd.py is excluded by !Lib/**
  • Lib/test/cov.py is excluded by !Lib/**
  • Lib/test/libregrtest/refleak.py is excluded by !Lib/**
  • Lib/test/libregrtest/run_workers.py is excluded by !Lib/**
  • Lib/test/libregrtest/runtests.py is excluded by !Lib/**
  • Lib/test/libregrtest/setup.py is excluded by !Lib/**
  • Lib/test/libregrtest/tsan.py is excluded by !Lib/**
  • Lib/test/subprocessdata/fd_status.py is excluded by !Lib/**
  • Lib/test/support/strace_helper.py is excluded by !Lib/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@youknowone
youknowone marked this pull request as ready for review October 22, 2026 09:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T09:23:24.812643Z 489292f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@youknowone
youknowone merged commit 1ffba21 into RustPython:main Oct 22, 2026
22 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 489292f664

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Lib/test/bisect_cmd.py
@@ -0,0 +1,185 @@
#!/usr/bin/env python3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep new harness logic out of Lib/test

This new executable helper is test-harness logic, and the same commit also changes runner selection, cleanup, and test data in other Lib/test files. Repository rules forbid modifying test logic or data and limit acceptable test-file changes to adding or removing expected-failure markers, so this synchronization must be reworked without these test-file logic edits.

AGENTS.md reference: AGENTS.md:L278-L282

Useful? React with 👍 / 👎.

Comment thread Lib/test/cov.py
@@ -0,0 +1,48 @@
"""A minimal hook for gathering line coverage of the standard library.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the required Assisted-by trailer

The commit explicitly states that Codex assisted with implementation and validation, but its parsed trailers contain no Assisted-by entry. Repository policy requires every AI-assisted contribution to use an Assisted-by: AGENT_NAME:MODEL_VERSION trailer, so the required trailer must be supplied before merge.

AGENTS.md reference: AGENTS.md:L20-L23

Useful? React with 👍 / 👎.

parent_sid = os.getsid(0)
sid = os.getsid(popen.pid)
use_killpg = (sid != parent_sid)
try:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Run the mandatory validation suites

The commit's validation section explicitly says the full workspace/CAPI suites were not run and that the changed modules were not executed or imported, despite adding platform- and process-sensitive runner behavior here. Repository validation requires the workspace suite, the CAPI suite, and relevant RustPython module tests for Lib/ changes before completion, so those checks are mandatory before merge.

AGENTS.md reference: AGENTS.md:L31-L35

Useful? React with 👍 / 👎.

Comment thread Lib/test/bisect_cmd.py
Comment on lines +52 to +53
cmd.extend(subprocess._args_from_interpreter_flags())
cmd.extend(subprocess._optim_args_from_interpreter_flags())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Forward the optimization flag only once

When bisection starts under -O, the repository's _args_from_interpreter_flags() already initializes its result from _optim_args_from_interpreter_flags() (Lib/subprocess.py:421-435), and the next line appends that optimization flag again. RustPython's CLI help distinguishes -O from -OO because the latter also discards docstrings (src/settings.rs:79-82), while the parser increments the level for every occurrence (src/settings.rs:145), so the list/test children run at -OO instead of the parent's -O and can stop reproducing docstring-sensitive failures; remove the second append.

Useful? React with 👍 / 👎.

Comment thread Lib/test/bisect_cmd.py
def list_cases(args):
cmd = python_cmd()
cmd.extend(['-m', 'test', '--list-cases'])
cmd.extend(args.test_args)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve --python semantics during bisection

In a -j ... --python COMMAND --bisect run, the checked -m test --help contract describes --python as the test-subprocess command (Lib/test/libregrtest/cmdline.py:256-257) and --bisect as invoking this module (Lib/test/libregrtest/cmdline.py:394-395). RunTests.bisect_cmd_args() forwards --python but not -j, and appending it here creates python -m test --list-cases --python COMMAND; _parse_args() rejects that combination at Lib/test/libregrtest/cmdline.py:524-526 with -p requires -j!, so custom-interpreter bisection aborts before listing cases. Carry the interpreter command separately instead of forwarding this invalid regrtest combination.

Useful? React with 👍 / 👎.

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.

2 participants