Title: Add canonical cross-interpreter serialization tests and fixture bridges by youknowdot · Pull Request #9408 · RustPython/RustPython · GitHub
Open Graph Title: Add canonical cross-interpreter serialization tests and fixture bridges by youknowdot · Pull Request #9408 · RustPython/RustPython
X Title: Add canonical cross-interpreter serialization tests and fixture bridges by youknowdot · Pull Request #9408 · RustPython/RustPython
Description: Summary
Split the canonical cross-interpreter serialization test cohort out of #8954:
Import the complete test_crossinterp module from CPython d220409a13b77de7a6c30abe16ea90db01528edc using scripts/update_lib migrate, without changed expectations or new markers.
Add the two _testinternalcapi capsule bridges consumed by that module, reusing the existing cross-interpreter serialization and validation implementation.
Keep pickle/marshal/script fixture modes in a private CrossinterpData wrapper instead of extending the production SharedValue representation or public API.
The supporting _code_definitions and _crossinterp_definitions modules 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), including Modules/_testinternalcapi.c and Python/crossinterp.c. Follow-up 90bb550c2d52a156627ae391ca8a48fdfdcafb14 consolidates 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
Canonical module and supporting definitions: byte-for-byte comparisons passed.
Normal check-merge-conflict, Ruff format/check, redundant-test-patches and rustfmt hooks passed; prettier had no applicable files. git diff --check passed. Only cspell was omitted locally with explicit user authorization. Lint CI, including cspell, passed for simplified head 90bb550c2d52a156627ae391ca8a48fdfdcafb14.
Focused default VM library cargo check: passed on the simplified source.
Strict default VM library Clippy: fails at unchanged _ctypes/base.rs:2246, arc_with_non_send_sync on Arc
Open Graph Description: Summary Split the canonical cross-interpreter serialization test cohort out of #8954: Import the complete test_crossinterp module from CPython d220409a13b77de7a6c30abe16ea90db01528edc using script...
X Description: Summary Split the canonical cross-interpreter serialization test cohort out of #8954: Import the complete test_crossinterp module from CPython d220409a13b77de7a6c30abe16ea90db01528edc using script...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9408
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ef0e9468-c389-327d-d9b2-9bc4c2d0cf3a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DAEC:3AE22D:1A0B7:20A00:6B01E6C4 |
| html-safe-nonce | ef7ed22125e0a9aff22a04d2b4d08a69d9932c7d98bb26e341bd98e2eef80757 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUVDOjNBRTIyRDoxQTBCNzoyMEEwMDo2QjAxRTZDNCIsInZpc2l0b3JfaWQiOiIzOTYyMjc4OTc1NDA2MDE1NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7089dcbd75a9499465ad146d2704c7ca6ea1ecd92269510baed85040dd71c87d |
| hovercard-subject-tag | pull_request:5036743173 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9408/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Split the canonical cross-interpreter serialization test cohort out of #8954: Import the complete test_crossinterp module from CPython d220409a13b77de7a6c30abe16ea90db01528edc using script... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width