Repository navigation
Synchronize regression harness helpers with Python 3.15 - #9297
Conversation
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
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters: 9
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| @@ -0,0 +1,185 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
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 👍 / 👎.
| @@ -0,0 +1,48 @@ | |||
| """A minimal hook for gathering line coverage of the standard library. | |||
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 👍 / 👎.
| cmd.extend(subprocess._args_from_interpreter_flags()) | ||
| cmd.extend(subprocess._optim_args_from_interpreter_flags()) |
There was a problem hiding this comment.
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 👍 / 👎.
| def list_cases(args): | ||
| cmd = python_cmd() | ||
| cmd.extend(['-m', 'test', '--list-cases']) | ||
| cmd.extend(args.test_args) |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Split the regression-harness support portion of #8954 into a focused canonical-library update.
Synchronize nine modules using
scripts/update_libfrom CPython 3.15.0, pinned tod220409a13b77de7a6c30abe16ea90db01528edc:getsid()permission handling and restore the Python SIGINT handler when inherited as ignored/default.ByteStringABC registries during reference-leak cleanup.mmap2calls 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.pypackage-splitting change stays out of this PR: itstest_free_threadingentry depends on a test family absent from this base. Existing discovery granularity, stack-limit adaptations and subprocess crash detection remain unchanged.Validation
ad8bd18f341445761fc57b1080db6e6e8e0e10e7. Generated code was not executed or imported.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.
-Xpresiteremains an unsupported native capability on the tested RustPython base; its command token is only generated by the existing opt-in-T/--coveragepath. 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.