Repository navigation
Integrate remaining Python 3.15 final runtime and libraries - #8954
youknowdot wants to merge 25 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 |
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
Restore the exact main isolation helper and preserve its TestIsolated class through the official update_lib importer. Retain all other Python 3.15 updates in test_support, including the new hashlib support coverage. This restores the late-child-crash checks landed in 26ff16c instead of replacing them with the older d220 CPython snapshot. Remove the second type-alias set_qualname call: enter_scope already assigns the same qualified name. This is redundant-work removal, not a new public metadata behavior change. Validation: source provenance and updater idempotence checks, normal hooks, codegen library check and strict Clippy. The restored subprocess isolation tests were not executed; no runtime or whole-workspace pass is claimed. Assisted-by: OpenAI Codex:model version unavailable
Integrate main at 9bd84b2 while preserving the published mega history. Keep the authentic profiler locator and capabilities from RustPython#9340, set-cycle GC from RustPython#9343, backward-compatible bytecode tooling from RustPython#9344, package paths from RustPython#9345, canonical Levenshtein coverage from RustPython#9346, and the safe full-width None-return scanner from RustPython#9347. Regenerate support helpers through the official updater from unchanged CPython d220409a13b7, preserving four exact existing-main neighborhoods. Retain the newer main specialization/C-stack helpers, Cargo environment adaptation, prior isolation checks and remaining Python 3.15 updates. The obsolete manual capability guard is superseded by the genuine API. Preserve unlanded explicit sharing modes and opcode override support. Ruff and XML vendor sources remain unchanged. Validation: normal hooks, locked host_env/VM/stdlib library check and strict Clippy, and the default CLI build. No target-runtime or full-suite pass is claimed for this composition. Assisted-by: OpenAI Codex:model version unavailable
Merge upstream main 0f74d1c while preserving the remaining Python 3.15 upgrade changes. Restore Lib/test/list_tests.py to the exact existing main version so the mega update does not replace the landed limited-stack test guard. Rust and vendor source bytes are unchanged from the previous mega head. Validated host_env and stdlib library check and strict Clippy on Linux. No stack, recursion, thread, or other target runtime test was run. Assisted-by: OpenAI Codex:model version unavailable
Remove one redundant LOAD_CONST tuple-folding test and duplicate NOP/consumer checks already covered by canonical peepholer tests. Retain the append test's raw frozenset deduplication and order assertion, all fixtures, the negative test, and inactive-slot metadata coverage. Validated with cargo check -p rustpython-codegen --tests. No test code was executed; no production or canonical Lib source changes are included. Assisted-by: OpenAI Codex:model version unavailable
Drop the added process-thread-wide guard drain at GILState detach, which lacks interpreter ownership filtering. Keep ordinary Python-thread cleanup unchanged; do not substitute unreviewed lifecycle machinery. Validated by selected threaded VM library check and strict Clippy. No lifecycle or interpreter runtime tests were executed. Assisted-by: OpenAI Codex:model version unavailable
Follow the project testing-layer policy by removing only the five new Python-behavior tests and their helpers. Preserve all twelve pre-existing tests and all production code. Canonical counterparts do not cover every frozen-specific combination; this is not a complete duplicate-coverage claim. Validated by compile-only C API test-target check and strict Clippy from crates/capi using the checked-in RustPython ABI3T configuration. No tests were executed. Assisted-by: OpenAI Codex:model version unavailable
Restore main warning matching and unused opcode override tooling. Keep the exact native IR tests and minimal helper guard from RustPython#9370 while pruning equivalent folding refactors. Remove only the newly added frozendict Rust/Python wrapper, preserving its Python suite and all runtime fixtures. Validated this exact tree with fresh codegen test-target and selected threaded VM library checks and strict Clippy. No test bodies, interpreter runtime or metadata generators executed. Assisted-by: OpenAI Codex:model version unavailable
Preserve landed main changes without rewriting the published integration stack. The first-parent delta contains only the landed CI consolidation and wasm CodeMirror dependency update; all Rust, Lib, tests and runtime fixtures remain unchanged. Normal and explicit affected-file hooks pass. Offline zizmor 1.31.1 reports four existing low-severity self-repository findings, identical to both baselines; this is not a warning-free pass. No findings suppressed or runtime tests executed. Assisted-by: OpenAI Codex:model version unavailable
Remove the 40 newly added tests that compile Python source and assert Python-visible compiler behavior, following the Python-behavior test placement policy. The deletion is a net 1160 lines. Preserve the entire existing main test module byte-for-byte and leave all production code unchanged, including the production changes owned by RustPython#9342. Canonical Python suites have topic-level overlap, not proven one-to-one coverage of every removed oracle case; no equivalent coverage claim or test translation is made. Bounded locked/offline codegen --tests cargo check and strict Clippy passed. These compile test targets only; no tests or runtime were executed. Assisted-by: OpenAI Codex:model version unavailable
Adopt landed RustPython#9365 Wtf8Buf thread diagnostics and current main wasm dependency updates without rewriting the published integration stack. Preserve removed Python-source Rust oracle tests and existing runtime fixtures. The final composition with the following tooling/export cleanup was validated by VM default/threading checks and strict Clippy. Rust sources here are identical to that final tested tree; this intermediate complete tree was not separately built. No interpreter or lifecycle runtime was executed. Assisted-by: OpenAI Codex:model version unavailable
Remove two helper modules from independent concurrent test targets while retaining their direct-import migration dependencies. This intentionally removes two explicit status/TODO rows. Add one synthetic-filesystem tooling regression; keep Lib and existing tests unchanged. Refresh capi-exports.def with four already implemented Stable ABI functions. Final exact tree passed source-only generator generation/check (518 names, 67 DATA), the selected synthetic updater test, and four VM default/threading check/strict-Clippy gates. Windows linking and interpreter/C API lifecycle runtime remain unvalidated. Assisted-by: OpenAI Codex:model version unavailable
Preserve landed class source-text location handling and ctypes scalar, bitfield and traced type-data changes, including contributor tests. Adopt the pinned main wasm package updates without rewriting the integration branch. No updater changes in this merge. Validated exact tree with VM default/threading check and strict Clippy, plus codegen tests compilation and strict Clippy. No interpreter, ctypes lifecycle, GC or snippet execution; cross-platform validation remains CI work. Assisted-by: OpenAI Codex:model version unavailable
Adopt the landed removal of one-off partial migration modes and content comparison corrections. Preserve the existing helper dependency regression and all main-owned changes without rewriting the integration branch. The exact composition passed 133 bounded synthetic-text updater tests with no skips. Interpreter and Lib sources are unchanged; no interpreter or fixture runtime executed. Benchmark files were adopted unchanged and not analyzed or executed. Assisted-by: OpenAI Codex:model version unavailable
…hecks Merge main df0d1b7, preserving the landed PEP 798, Windows runtime and ctypes owner changes. Resolve parser-option ownership conflicts without dropping the new unpacking diagnostic adapters. Remove the duplicate early lazy-future helper and its three callers. The existing main checker still rejects lazy __future__ imports; this restores main's diagnostic precedence and incomplete-interactive-input handling rather than claiming equivalence to the earlier mega ordering. Focused compiler check and strict Clippy passed on the source-bound tree. Six explicit affected-file non-cspell hooks passed without source changes. The normal commit hook ran with cspell alone omitted under the maintainer's explicit one-commit exception because its npm bootstrap is blocked. Cspell has not passed. Full workspace/runtime and new-head CI results are not claimed here. AI assistance: dot prepared and reviewed this reconciliation and performed the stated automated validation. The runtime does not expose its exact model version. Assisted-by: dot: model version not exposed
Merge pinned main's non-vendored XML implementation, preserving its canonical assertions and marker accounting. Remove obsolete XML vendor sources and restore the registry dependency and existing main limitations. Also remove the unused private monitoring adapter/fixture and duplicate badsyntax predicate while preserving ordinary monitoring and test guards. This intentionally removes private fixture APIs; it is not universal behavior equivalence or a full runtime-validation claim. AI assistance: dot prepared composition, source review and focused checks. The exact model version is not exposed. Assisted-by: dot: model version not exposed
Drop the added CPython Parser assets, which are not used by RustPython's Rust parser or build. Preserve the canonical ASDL test and its existing source-build guard unchanged. Normal RustPython CI already skips that CPython-source-only suite; external source-path overrides are not covered. Restore make_generator_or_coro to main's private visibility. Its two actual tracked call sites remain in the same module; no broader exposure is required by the remaining mega code. AI assistance: dot traced consumers and prepared this scoped cleanup. The exact model version is not exposed. Assisted-by: dot: model version not exposed
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
Restore four files to pinned main 77046cf: three comment-only changes and the AST constructor/annotation-list refactor. Preserve the existing abstract-type helper and its consumer, parser behavior and all Lib files. This reduces the mega diff scope, not total source lines. AI assistance: dot prepared and reviewed the restoration, static source proof and validation report. Exact model version is not exposed. Assisted-by: dot: model version not exposed
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
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.