Repository navigation
Restore canonical limited C API consumer tests - #9501
Conversation
Restore ten missing test modules and two package entry points with scripts/update_lib migrate from CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve canonical optional-fixture import guards without changing assertions or enabling native fixtures. This is source restoration, not C API support; 32 package files remain missing. OpenAI Codex assisted source selection, source-only safety review, migration, and byte/AST/tooling validation. No local interpreter tests or native builds were run. Assisted-by: OpenAI Codex:model version unavailable
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] test: cpython/Lib/test/test_capi dependencies: dependent tests: (no tests depend on capi) Legend:
|
Merging this PR will not alter performance
Comparing Footnotes
|
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: 7d22d9558b
ℹ️ 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,12 @@ | |||
| import os | |||
There was a problem hiding this comment.
Add the required machine-readable AI-assistance trailer
The reviewed commit explicitly documents OpenAI Codex assistance, but its message contains no Assisted-by: AGENT_NAME:MODEL_VERSION trailer. The prose ## AI disclosure section does not satisfy the per-tool, tool-and-model attribution format required by AGENTS.md. Include the required trailer for the AI tool used so this contribution complies with the repository’s attribution convention.
AGENTS.md reference: AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
|
|
||
|
|
||
| def load_tests(*args): | ||
| return load_package_tests(os.path.dirname(__file__), *args) |
There was a problem hiding this comment.
Perform the required RustPython validation for the package
For this Lib/ restoration, the commit explicitly reports that no interpreter tests or native builds were performed. Byte comparisons and AST checks do not exercise this new package-discovery entry point or establish that RustPython reaches the optional-fixture skips successfully. AGENTS.md requires workspace tests, C-API tests from crates/capi, and the relevant interpreter test module; run those checks or record a concrete environmental blocker rather than treating source restoration as an exemption. The review attempts stopped at dependency resolution because the pinned parking_lot_core dependency is unavailable offline, so runtime validation remains unverified.
AGENTS.md reference: AGENTS.md:L35-L35
Useful? React with 👍 / 👎.
Summary
Restore ten missing limited-C-API fixture consumer test modules from pinned CPython 3.15.0 (
d220409a13b77de7a6c30abe16ea90db01528edc) using the existingscripts/update_lib migratecommand, with the canonical test_capi package entry points.All twelve files are byte-identical to the pin. No native implementation, fixture registration, global test-enablement flag, adapter, skip, or assertion is changed. Each test module already has CPython's early optional
_testlimitedcapiimport gate, before fixture attribute accesses and test definitions. The canonical missing-fixture gate is preserved rather than introducing RustPython-specific skips.This is source restoration, not C API support or passing test-body coverage. Current RustPython has no
_testlimitedcapifixture module. Future partial fixture implementations must be checked against these original assertions before activating their bodies. The package still lacks 32 of its 44 canonical Python files; actual update_lib todo continues to report test_capi pending.Validation
Scope
No direct changed-file overlap with #9143 or #9270; this does not implement their native fixtures, CI capability or Windows exports. This is a bounded source-restoration slice of the Python 3.15 upgrade tracked in #8954. No dependency on #9498 updater adaptations.
AI disclosure
OpenAI Codex assisted with source selection, safety/ownership review, the updater invocation, source-identity and tooling checks, and this description. The restored Python files themselves are unchanged upstream CPython source. No human runtime verification or successful C API body execution is claimed; this draft is explicitly limited to canonical source restoration.