Repository navigation
Add canonical cross-interpreter serialization tests and fixture bridges - #9408
Conversation
Import the complete CPython test_crossinterp module and provide its capsule bridges using existing serialization and validation logic. Keep fixture modes private instead of expanding SharedValue or interpreter lifecycle APIs. Assisted-by: OpenAI Codex: model version unavailable
|
Caution Review failedThe pull request is closed. Finishing Touches
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 |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] lib: cpython/Lib/xml dependencies:
dependent tests: (38 tests)
[x] lib: cpython/Lib/concurrent dependencies:
dependent tests: (19 tests)
Legend:
|
Match CPython 3.15.0 mode dispatch with one private constructor instead of six forwarding entry points. Keep generic marshal data distinct from code transport, preserve capsule ownership checks and pure-script validation, and leave the canonical tests unchanged. Assisted-by: OpenAI Codex: model version unavailable
Merging this PR will not alter performance
Comparing Footnotes
|
Reconcile the mega bridge with reviewed RustPython#9408 source at 90bb550. Keep unrelated interpreter lifecycle, fixtures and canonical Lib unchanged. This reduces production API exposure rather than total lines. AI assistance: dot prepared the source reconciliation, consumer audit and validation report. Exact model version is not exposed. Assisted-by: dot: model version not exposed
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. |
Merge main 058bebf after RustPython#9408 landed. Keep the landed standalone CrossinterpData import and remove its duplicate grouped import from the combined tree. Preserve incoming main changes and prior mega cleanup. AI assistance: dot diagnosed the synthetic-merge compile failure, prepared and reviewed the reconciliation and validation report. Exact model version is not exposed. Assisted-by: dot: model version not exposed
Summary
Split the canonical cross-interpreter serialization test cohort out of #8954:
test_crossinterpmodule from CPythond220409a13b77de7a6c30abe16ea90db01528edcusingscripts/update_lib migrate, without changed expectations or new markers._testinternalcapicapsule bridges consumed by that module, reusing the existing cross-interpreter serialization and validation implementation.CrossinterpDatawrapper instead of extending the productionSharedValuerepresentation or public API.The supporting
_code_definitionsand_crossinterp_definitionsmodules already match the same CPython revision. No lifecycle, interpreter creation/destruction, C API exports, parser or vendored dependency changes are included.This is test infrastructure and canonical coverage, not a new production cross-interpreter API. Static source inventory finds 102 discoverable test methods (93 definitions plus inherited tests); this is not an execution result.
CPython comparison and simplification
Compared directly with CPython 3.15.0 (
d220409a), includingModules/_testinternalcapi.candPython/crossinterp.c. Follow-up90bb550c2d52a156627ae391ca8a48fdfdcafb14consolidates six constructor entry points into one mode dispatcher (19 fewer Rust lines), retaining the distinction between generic marshal and code transport, capsule ownership checks, and pure-script validation order. The canonical tests are unchanged; the four adjacent exception-capture tests cover existing behavior rather than justify new bridge code.Validation
git diff --checkpassed. Only cspell was omitted locally with explicit user authorization. Lint CI, including cspell, passed for simplified head90bb550c2d52a156627ae391ca8a48fdfdcafb14.cargo check: passed on the simplified source._ctypes/base.rs:2246,arc_with_non_send_synconArc<BufferWrite>in non-threading mode. The entire file matches maindf0d1b74; a separate baseline Clippy run was not performed. No lint suppression or unrelated ctypes changes are included.test_crossinterp passedexplicitly recorded on all three for simplified head90bb550c2d52a156627ae391ca8a48fdfdcafb14. macOS reached its final success after the test runner handled an environment-changed result. Lib dependency checks also passed. The complete 24-job correctness workflow and Lib dependency workflow passed for this exact simplified head. This PR remains a draft for review.The focused checks are source/cache/toolchain-bound, offline and resource-bounded. Independent review covered capsule ownership, private fixture boundaries and script-validation ordering. Local runtime testing remains separate: the canonical module creates a temporary import fixture and reads supporting definition files, so it is not a read-only test.