Repository navigation
Integrate remaining Python 3.15 final runtime and libraries - #8954
youknowdot wants to merge 2 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. |
There was a problem hiding this comment.
don't add duplicated tests from Lib/test
There was a problem hiding this comment.
Aligned this file with the complete snippet already merged in #8947 (43065e7). There is now no snippet diff against current main, and the merged coverage is preserved. The CPython 3.15.0 reference run and commit hooks passed; the mega branch native suite has not been rerun for this test-only alignment.
fb0f7b6 to
85d2fb9
Compare
1aba241 to
16a2ef9
Compare
Merging this PR will degrade performance by 10.12%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
0d7489c to
e14427a
Compare
Split the Python 3.14-compatible empty native dictionary fast path from #8954. Extend the existing JSON snippet with root, nested, sorting, and nonempty subclass regression coverage. Assisted-by: OpenAI Codex:model identifier unavailable
Use the natural logarithm path for both operands, evaluating x first. Preserve large integer bases and raise ZeroDivisionError for base one while retaining noninteger conversion errors. Split the Python 3.14-compatible behavior from #8954 without its additional __index__ fallback or changes to log2 and log10. Assisted-by: OpenAI Codex:model identifier unavailable
4a79418 to
eb08f9c
Compare
Replay the exact aggregate residual from ac6fbcf onto main b7e6e58. Historical integration commits and merge resolutions are squashed; the original tip is preserved in the local backup and audit record. The conflict-free three-way tree has the same stable residual patch ID before and after rebasing. The current normal Ruff hook additionally normalizes one standard-library import group in scripts/generate_capi_exports.py. Preserve the remaining parser, native, and Lib work without claiming that pending independent PRs have landed or that compatibility is complete. Assisted-by: OpenAI Codex: model version unavailable
ac6fbcf to
088a94d
Compare
Mirror the normal CI C API feature set and environment for test_frame, test_inspect, and test_monitoring before collecting the remaining non-CAPI suite. Keep the dedicated cohort strict and retain the existing general-suite collection policy. Clean coverage artifacts once before collecting both feature sets. AI assistance: source diagnosis, workflow implementation, and static review. Validated actionlint, normal hooks, YAML invariants, and zizmor SARIF scanning with unchanged baseline findings. No local C API runtime was executed; hosted coverage validation remains pending. Assisted-by: OpenAI Codex: model version unavailable
Current rebase and Lib C API coverage follow-up (2026-10-31)
Current head:
6b2120fe1fcf63e9032b829f63f7c3de8bfcf015. Rebase commit088a94d7feabebb246d772f29ddebc492337efecreplays the aggregate remaining integration fromac6fbcf97bc92cdeed6f5776bcbacc40a7b29653onto mainb7e6e584f1c73b55a9a27790fd81e715a59e92bf. Historical sections below describe their named commits, not current-head validation. The upgrade remains in progress; this is not a complete CPython-compatibility claim.The workflow-only follow-up separates canonical
test_frame,test_inspect, andtest_monitoringinto a strict C API-enabled coverage cohort, matching normal CI's feature/environment configuration. The general coverage suite remains non-CAPI and excludes exactly those three modules. Default snippets, the existing general collectioncontinue-on-errorpolicy, and final coverage reporting are unchanged. Coverage artifacts are cleaned once before collection and retained across feature cohorts.Validation of the new workflow: normal applicable commit hooks, actionlint 1.7.12, YAML configuration assertions, diff checks, and independent source review passed. Zizmor 1.31.1 SARIF scanning completed with the same five pre-existing permissions findings as the untouched baseline; this is not a warning-free scan. No local C API or coverage runtime was executed. New-head hosted correctness and the strict instrumented C API cohort are pending.
For the preceding exact head
088a94d7, normal correctness CI and Lib Dependencies passed. Normal CI executes the three C API modules separately with C API exports enabled. Periodic checks also reported success, but its tolerated full Python coverage step did not pass:test_lzmaaborted inxz-core 0.1.0-rc.0on subtraction overflow followed by a destructor panic. The same abort andtest_intfailures occur on the rebase-base main run. Those issues are not fixed by this workflow change. The prior separate canonical manager XML-RPC coverage regression did execute and pass. Old green status must not be treated as validation of this new head or of the complete coverage suite.AI assistance: OpenAI Codex assisted with source diagnosis, this workflow change, and static review; the commit includes the assistance trailer. No interpreter behavior, dependency pins, or test assertions were changed by this follow-up.
Summary
Remaining Python 3.15 integration based on official CPython v3.15.0 (
d220409a13b77de7a6c30abe16ea90db01528edc). This remains a broad integration draft, not a claim of complete compatibility. Meaningful runtime and library changes continue to be separated into focused PRs.Main reconciliation and compiler reduction
Reconciliation commit:
1880d095ecc534c1000d344c0b98ddfe56307b7a. Validated source tree:9a61a9a8f4a8bf1830af4c10db95e5acdd2392ca.df0d1b74c04408365f66666a03054d673dbccee7on top of mega0706c9bc463b9067d298b70448740704e64cab8c, preserving landed Implement PEP 798 comprehension unpacking #9342 comprehension unpacking/diagnostics, Fix Windows runtime compatibility issues #9406 Windows runtime compatibility, Preserve ctypes py_object provenance across casts and pointer writes #9391 ctypes provenance, Share ctypes backing-owner snapshots between aggregate copies #9392/Fix ctypes subclass bitfields and native type metadata #9395 ctypes ownership/type metadata, and Decide tp_new inheritance of static types at type initialization #9386 statictp_newinheritance.lazy_future_import_errorhelper and its three call sites (64 lines). The existing main-ownedunsupported_grammar_erroralready rejects lazy__future__imports with the same ordinary message and four-bytelazyrange. This deliberately restores main's error precedence and incomplete-interactive-input behavior; it is not claimed to be behavior-identical to the previous mega ordering.The two other pre-existing compiler residuals remain unchanged: the vendored parser's concatenated-literal diagnostic range and the obsolete-comparison adapter associated with #9074. Their ownership and validation are separate from this cleanup.
Validation of previous reconciliation
1880d095cargo check --locked --offline -j1 -p rustpython-compiler --lib --target x86_64-unknown-linux-gnupassed.cargo clippy --locked --offline -j1 -p rustpython-compiler --lib --target x86_64-unknown-linux-gnu -- -D warningspassed.These are focused compiler compile-only results, not a new CLI build, Python execution, full workspace/C-API test run, or all-platform CI result. #9342's green CI does not automatically validate mega's different parser composition. For exact commit
1880d095ecc534c1000d344c0b98ddfe56307b7a, correctness CI completed successfully with all 24 jobs, including Linux, macOS, Windows and WASI CPython jobs. Lib Dependencies also passed. These hosted results apply to this commit, not future unpublished changes. That prior head conflicted with newer mainb25ab5e76b1f287e3599bd60a58b65abf167de7b; the appended reconciliation below resolves that source composition. The prior green run does not validate the new head or establish merge readiness.Remaining scope and limits
The earlier
1880d095reconciliation left the inherited vendor trees unchanged. The new update below removes XML vendoring after #9197 landed. The remaining Ruff parser vendor tree is unchanged and remains subject to existing ownership/architecture constraints; retaining it does not endorse new vendoring. Parser/AST/warning-producer residuals, C-API fixtures, interpreter lifecycle/GC changes and their existing ownership constraints remain separate work. No new full-suite, parser fuzz, lifecycle/GC stress, profiler, native-stack/thread or JIT runtime test was executed for this cleanup.Previous validation belongs to its previously identified commits, not this composition. This PR stays draft while splitting and compatibility work continue. No merge or automatic merge is requested.
AI assistance
Source reconciliation, cleanup, independent review and automated validation were assisted by dot. The runtime does not expose its exact model version. Commit trailers disclose the assistance; no human-use verification is claimed.
Reconcile landed XML and remove unused mega scaffolding
Published source commit:
4914518a068987677abfa8e9d609414b1506820a; validated tree:fad1706539e0bc52e687d0b56a6756555417b4d5.Normal merge of pinned main
b25ab5e76b1f287e3599bd60a58b65abf167de7binto mega1880d095ecc534c1000d344c0b98ddfe56307b7a, combined with the separately reviewed six-file monitoring/lazy-predicate cleanup. This reduces the existing mega branch; no duplicate XML PR is needed.Landed XML reconciliation
vendor/xmltree and its Cargo workspace/hook exclusions; retain unrelated parser-vendor configuration unchanged.xml1.4.0 with the exact registry source and lock checksum from main.URLError, not successful external DTD parsing.Monitoring/lazy-predicate cleanup
_testcapimonitoring fixture/registration.syswiring to pinned main. Remove only the later duplicate badsyntax predicate; retain the earlier unconditional exclusion and other short-circuit guards.PyMonitoringC ABI exports. Canonical consumers remain under their existing whole-class skip; no canonical monitoring assertion or skip is changed. Unrelated_testcapifixtures remain intact.This deliberately removes monitoring-specific private fixture names in capi-enabled builds; it is not a universal API/behavior-equivalence claim or a native C monitoring test pass.
Validation boundaries
da956ed18b6ae43fa6e8591bde1f874c3f36325f.cargo check -p rustpython-stdlib --lib --no-default-features --features compiler,host_env,threading --target x86_64-unknown-linux-gnupassed on this combined tree (stdlib check: 535 seconds). Shared leases, resource bounds and full pre/post source/tool/cache closure checks passed.4914518ahead, hosted Lint/cspell and Lib Dependencies passed; Linux production and CAPI canonical jobs and WASI passed. Remaining correctness jobs were still active/queued before the follow-up below. These results do not validate the newer follow-up head.AI assistance: dot prepared source composition, migration provenance checks and bounded validation. Exact model version is not exposed.
Remove unnecessary ASDL assets and helper exposure
Follow-up commit:
cc9f601182cad6054a5e57c111ba20ce7886c282; source tree:39469209bdab4783a33e8bb4ecf40d22ec52d4f6.This follow-up removes the mega-only
Parser/Python.asdl,Parser/asdl.py, and accompanying README. They are CPython ASDL test assets, not inputs to RustPython's Rust parser, code generator or build. The only tracked loader is the canonicaltest_asdl_parsersuite; its source-build guard, assertions and all otherLibfiles remain unchanged.In the normal RustPython checkout/build configuration,
sysconfig.is_python_build()finds no CPythonModules/SetuporModules/Setup.localmarker. The parent commit's Linux canonical CI already reportedtest_asdl_parser skipped -- test irrelevant for an installed Pythonwhile these assets were present. This is not an unconditional skip guarantee for unusual_PYTHON_PROJECT_BASE/sys._homeoverrides pointing at a foreign CPython source build.The same cleanup restores
make_generator_or_coroto main's private visibility. Its two actual tracked callers are in the same module; the three other mentions are comments. No generator implementation or Python behavior is changed.Validation: exact four-path diff, unchanged
Libtree, helper file byte-identical to pinned main, complete tracked consumer search, staged diff checks and configured conflict/rustfmt checks passed. No new local interpreter runtime, full build or Clippy run was performed for this follow-up. The normal Git commit ran all other configured hooks successfully; local cspell alone was omitted under the user's instruction to use CI. For exact follow-up headcc9f601182cad6054a5e57c111ba20ce7886c282, correctness CI completed successfully, including Linux, macOS and Windows native canonical/CAPI jobs. Hosted Lint passed, with cspell verified in both hook stages, and Lib Dependencies passed. These hosted results apply to this exact head; they do not establish complete Python compatibility or remove the draft and validation limitations above.Reconcile cross-interpreter fixture boundaries with #9408
Follow-up commit:
dfdd8a5560c511424d720ad1391645bf549b936e; source tree:77d0bbccedc9a106b7b9ec0cb72688259868387e.This follow-up reuses the reviewed #9408 source at
90bb550c2d52a156627ae391ca8a48fdfdcafb14:vm/crossinterp.rsand itstest_support.rsare byte-identical to that revision, and the matching capsule fixture block is carried into mega without changing its unrelated interpreter lifecycle or time fixtures.Marshalledfrom productionSharedValue, restore privatefrom_function, and remove the fixture-only public pickle/marshal/script constructors. Preserve all serialization modes in a crate-privateCrossinterpDatabridge.Libfile, test assertion, interpreter lifecycle implementation, parser or main-owned change is modified. This is not a new duplicate PR or a wholesale main merge.Validation: independent source integration review and staged whitespace checks passed. The normal commit ran configured hooks other than cspell successfully (conflict/rustfmt passed; other file types were inapplicable); local cspell is omitted under the user's instruction to verify it in CI. The environment reset removed the dependency/build cache, so no new local compile, Clippy or interpreter runtime result is claimed. Prior #9408 and mega CI belong to their respective heads and do not validate this new composition. For exact follow-up head
dfdd8a5560c511424d720ad1391645bf549b936e, correctness CI completed successfully with all 24 jobs, including Linux, macOS and Windows production/CAPI canonical jobs. Hosted Lint passed, with cspell verified in both hook stages, and Lib Dependencies passed. These hosted results validate this exact head within the workflow coverage, not complete Python compatibility. The PR remains draft, with all earlier behavioral and validation limitations retained.Drop nonessential codegen/VM refactor differences
Follow-up commit:
cbb1ce4fd26bc0b5687174bdd1df2609fc0f9afa; source tree:d9b7b6ede1c27bb84b67c583a03a4b9dec3f43eb.Restore four files byte-for-byte to pinned main
77046cf527fac8a1429683c1d6fe66a30e3f1be7:crates/codegen/src/compile.rs,crates/vm/src/import.rs,crates/vm/src/vm/mod.rs, andcrates/vm/src/stdlib/_ast/python.rs. The first three contain only comment differences. The AST differences were a constructor return-style rewrite and reuse of an existing abstract-type list, not new compatibility behavior.The existing
abstract_types()helper and its realis_abstractconsumer remain intact. AST registration explicitly binds the module'sASTattribute toNodeAstbefore annotation initialization. Restoring main initializes the same base and twelve abstract types, with main's assignment order (AST.__annotations__is assigned before_fields,_attributesand__match_args__, rather than afterward). This does not claim identical class-dictionary insertion order or every observable; it is normal-path source reasoning, not a new allocation-failure or runtime-equivalence test claim. Actual type-comment rejection metadata, parser/compiler behavior, cross-interpreter bridges, interpreter lifecycle, source-directory reporting, and all canonicalLibfiles remain untouched.This removes four files from mega's diff against pinned main. The follow-up itself adds 20 and removes 5 lines; it reduces patch scope, not total source size. Independent source review, exact main-blob comparison and normal applicable commit hooks passed for this small restoration (conflict/rustfmt passed; other file types were inapplicable). No fresh local compile, Clippy or interpreter runtime was run; cspell is checked in CI under the user's instruction. Previous green results belong to
dfdd8a556, not this new head. New-head correctness, Lib Dependencies and cspell CI are pending; draft status and previous limitations remain.Reconcile the newly landed cross-interpreter split
Merge commit:
720ca7869188421c264f3da7f2a960ca674f6009; source tree:f84ee214d99e416e9a68b78c68a76aee27678daf.#9408 landed as main
058bebf0f07be2508feed2470933990c9edb16c4while the preceding cleanup was being published. GitHub's synthetic merge ofcbb1ce4fdwith that new main combined two equivalent import layouts and failed with Rust E0252 (CrossinterpDataimported twice). This was a compile failure in the combined tree, not a test assertion failure or a reason to remove the fixture.This normal main merge preserves the landed CSV and C API changes and all four preceding cleanup files. The only manual merge adjustment removes the duplicate grouped import, retaining the standalone import exactly as landed in #9408. Incoming canonical
Libchanges are copied from main without manual edits. No test expectations, compiler/parser behavior or fixture functionality is removed.Independent source review checks the natural merge plus the exact one-line resolution, incoming-main entries, and one remaining import. Normal applicable commit hooks passed (conflict/rustfmt; other file types were inapplicable under merge selection); local cspell is left to hosted CI as authorized. No new local compile/runtime pass is claimed. The preceding
cbb1ce4fdworkflow contains real compilation failures and must not be described as green; new-head correctness, Lib Dependencies and cspell CI remain pending. Draft status and earlier validation limits are retained.