Repository navigation
Align compiler and VM bytecode contracts with CPython 3.15 - #9088
youknowone wants to merge 16 commits into
Conversation
|
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. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: :4: SyntaxWarning: invalid decimal literal dependencies: dependent tests: (no tests depend on compile) [ ] lib: cpython/Lib/code.py dependencies:
dependent tests: (2 tests) [ ] test: cpython/Lib/test/test_monitoring.py (TODO: 3) dependencies: dependent tests: (no tests depend on monitoring) [x] lib: cpython/Lib/warnings.py dependencies:
dependent tests: (55 tests)
[x] lib: cpython/Lib/opcode.py dependencies:
dependent tests: (50 tests)
[ ] test: cpython/Lib/test/test_import (TODO: 3) dependencies: dependent tests: (no tests depend on import) [x] lib: cpython/Lib/dis.py dependencies:
dependent tests: (80 tests)
[x] test: cpython/Lib/test/test_generators.py dependencies: dependent tests: (no tests depend on generator) [ ] test: cpython/Lib/test/test_format.py dependencies: dependent tests: (no tests depend on format) Legend:
|
Merging this PR will not alter performance
Comparing Footnotes
|
Reconstruct the compiler-only baseline from validated487ae47 on the current main and frozen mapping prerequisitec78d811. Preserve the full source delta while dropping obsolete prerequisite ancestry; detailed old-to-new provenance is retained in the recovery artifact. Assisted-by: OpenAI Codex: model identifier unavailable
Replay reviewed compiler CI repairs 476bb74 on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure. Assisted-by: OpenAI Codex: model identifier unavailable
Replay reviewed compiler CI repairs 6482adf on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure. Assisted-by: OpenAI Codex: model identifier unavailable
Replay reviewed compiler CI repairs 246c309 on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure. Assisted-by: OpenAI Codex: model identifier unavailable
Replay reviewed compiler CI repairs 7ecedcf on the frozen current prerequisite. Intermediate compile/diagnostic corrections are combined where they address the same failure. Assisted-by: OpenAI Codex: model identifier unavailable
c70fd5d to
dc5ce40
Compare
Preserve canonical tests while recording bounded per-method progress under separate Windows Job Objects. Assisted-by: OpenAI Codex: model identifier unavailable
Replace successful isolated diagnostics with persistent capture of the existing canonical worker output, without changing test selection or timeouts. Assisted-by: OpenAI Codex: model identifier unavailable
Snapshot locked send buffers before waiting and preserve the host-captured Winsock error across VM reattachment. Assisted-by: OpenAI Codex: model identifier unavailable
Combine exact RustPython#8951 mapping head c78d811 and RustPython#9093 socket I/O head a26d161 on main e09846b. Assisted-by: OpenAI Codex: model identifier unavailable
Keep the compiler-only diff unchanged while incorporating the exact source-reviewed RustPython#9093 repair. Assisted-by: OpenAI Codex: model identifier unavailable
Assisted-by: OpenAI Codex: model identifier unavailable
Assisted-by: OpenAI Codex: model identifier unavailable
The original test_remote and all 82 manager tests completed in the retained hosted capture. Restore the unchanged canonical invocation and remove temporary capture upload/launcher. Assisted-by: OpenAI Codex: model identifier unavailable
Preserve the compiler-only changes while incorporating current main and the validated mapping/STW prerequisites. Assisted-by: OpenAI Codex: model identifier unavailable
Summary
Align the compiler and VM bytecode contracts with final CPython 3.15.0, pinned to
d220409a13b77de7a6c30abe16ea90db01528edc.The transition covers opcode IDs/caches and stack contracts, common constants, iterator/generator creation, code-object field ownership, public opcode metadata, and the affected runtime consumers. Subsequent CI repairs cover script validation, exception cleanup, generator frame lifecycle, code-name ownership, warnings/format contracts, constant folding, and local monitoring events.
Current prerequisite stack
This Draft targets
compiler-315-prerequisites-main2a-c78-stw0baat987188dbeaaac3d155a6c5e48b467db0900d43f3. The prerequisite contains:2aacf9dba91f39e59a776e3b6bcbf1f0f5bcc21e, including merged Windows socket detachment (Detach Windows multiprocessing socket I/O during blocking calls #9093) and the native-base initializer repair (Initialize PyRef marker in native base conversion #9096).c78d811fc478ed098b4b5c9bd79556784a918be8.0ba10767926e62099bdc43726e5b8cc4372fb435.#8951 and #9094 remain open at this checkpoint. Both exact prerequisite heads passed their hosted CI. Contributor #9095 remains separate and is not included.
Compiler head:
a2f28469a7e91be7da0baa9383be702f63b8fc19, tree0c1d52af0f5fac8d594c5a39705c4cb96532a399.The compiler-only diff remains 87 files, 13,311 additions and 2,460 deletions, including 13 Lib files. Its ordered per-file additions/deletions are identical to the preceding green compiler head; no Lib bytes changed in this integration. The seven reconstructed compiler commits and subsequent prerequisite integration commits retain their validation history. No temporary diagnostic workflow/scripts remain. Canonical opcode/dis and affected fixture/helper copies came through
update_libfrom pinned final CPython. The separately approved monitoring setup-order exception imports optional_testcapibefore registering tools, preserving the existing missing-helper skip.Do not merge into this temporary prerequisite branch. After the remaining prerequisites land, reconcile with their actual main merges, retarget and verify the merge tree and hosted checks.
Validation provenance
The following local build/runtime results belong to the earlier reconciled head
dc5ce40943b1980fb15d38cffb14e7bfb7cd1b36/ tree38272ea96767ab699ff88f599214cafab75e7726:23fdccfab0bfae348175cd19ac1967af9ed156cd39a41e53acfbbddbd05390d5; its embedded stamp isdc5ce40.The preceding compiler head
89cd7bb8d6220dc244b425dcd8cb18c9ca99fbefpassed all 25 hosted CI jobs and CodSpeed. The current prerequisite #9094 head also passed all 25 jobs and CodSpeed, including the four previously stalled interpreter/STW tests. The original Windows manager failure was observed through preserved canonical output; after socket detachment, the original remote-manager method and the full Windows suite passed. Temporary capture code was then removed.The current integration has normal-hook and independent source/ancestry/diff validation. It introduces current-main changes and the validated STW reentry hardening without changing the compiler-only patch. No new local runtime probe was run for this merge. Hosted CI for the current head passed all 25 jobs, including all three platform Python suites and Rust checks: CI run 38410788160. CodSpeed run 38410788106 also passed. These results establish CI stabilization for this exact integration; the compatibility limits below remain.
Compatibility limits
This is not complete byte-exact CPython compatibility. The historical unchanged 120-case strict corpus had 117 recursive raw-field matches and zero complete byte matches; it has not been rerun or relabeled for this reconciled head. Full marshal parity and PEP 810 runtime support remain incomplete. Private development pyc magic rejects incompatible intermediate formats, while the public cache tag is implementation/version-derived.
AI-assisted with OpenAI Codex; model identifier unavailable.