Repository navigation
Integrate remaining Python 3.15 final runtime and libraries - #8954
youknowdot wants to merge 6 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 improve performance by ×24
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | base64.py[rustpython] |
767.4 ms | 31.5 ms | ×24 |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing youknowdot:cpython-315-mega-integration (f32c093) with main (92e20da)
Footnotes
-
4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
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
43065e7 to
440fb23
Compare
1984aac to
f32c093
Compare
Rebase the remaining integration onto current main while retaining merged compiler and runtime fixes. Import canonical CPython v3.15.0 library sources through update_lib with preserved RustPython markers and explicit migration deferrals. Include the published dependency-report fix from PR RustPython#8958, partial slot correction from PR RustPython#9127, and update_lib repair with existing-workflow coverage from PR RustPython#9131. Assisted-by: OpenAI Codex:model version unavailable
Keep the mega C export set equal to main under the abi3t-only scope. Defer new monitoring exports and the unneeded legacy PyCFunction_Call entry, remove the new non-Stable Windows export exception, and regenerate existing stable buffer exports. Preserve main tests and Python monitoring fixtures. Read live bytecode configuration and return integer context flags as in CPython final. Assisted-by: OpenAI Codex:model version unavailable
Preserve bound-method reduce error ordering and restrict subprocess integration to supported platforms. Assisted-by: OpenAI Codex:model version unavailable
Accept frozendict operands in defaultdict union. Follow final-component links once and otherwise use the CPython home/name fallback, ignoring creator metadata. Align existing venv assertions with exact-final reference results while preserving nested environments after parent removal. Assisted-by: OpenAI Codex:model version unavailable
Keep native thread, TLS and subprocess checks enabled on supported platforms. Assisted-by: OpenAI Codex:model version unavailable
Match final CPython error formatting and propagate representation failures without losing surrogate text. Assisted-by: OpenAI Codex:model version unavailable
f32c093 to
0d9119b
Compare
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: :4: SyntaxWarning: invalid decimal literal dependencies:
dependent tests: (36 tests)
[x] lib: cpython/Lib/ctypes dependencies:
dependent tests: (37 tests)
[x] lib: cpython/Lib/getpass.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/asyncio dependencies:
dependent tests: (9 tests)
[x] lib: cpython/Lib/glob.py dependencies:
dependent tests: (88 tests)
[x] lib: cpython/Lib/http dependencies:
dependent tests: (54 tests)
[x] lib: cpython/Lib/uuid.py dependencies:
dependent tests: (3 tests)
[x] lib: cpython/Lib/urllib dependencies:
dependent tests: (108 tests)
[x] lib: cpython/Lib/zipfile dependencies:
dependent tests: (131 tests)
[x] lib: cpython/Lib/shelve.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/multiprocessing dependencies:
dependent tests: (14 tests)
[x] lib: cpython/Lib/tempfile.py dependencies:
dependent tests: (102 tests)
[x] lib: cpython/Lib/timeit.py dependencies:
dependent tests: (1 tests)
[x] test: cpython/Lib/test/test_patma.py dependencies: dependent tests: (no tests depend on patma) [x] test: cpython/Lib/test/test_marshal.py (TODO: 3) dependencies: dependent tests: (33 tests)
[x] lib: cpython/Lib/tkinter dependencies:
dependent tests: (7 tests)
[x] test: cpython/Lib/test/test_str.py (TODO: 4) dependencies: dependent tests: (no tests depend on str) [x] lib: cpython/Lib/dbm dependencies:
dependent tests: (5 tests)
[x] lib: cpython/Lib/dataclasses.py dependencies:
dependent tests: (104 tests)
[x] lib: cpython/Lib/typing.py dependencies:
dependent tests: (21 tests)
[x] lib: cpython/Lib/trace.py dependencies:
dependent tests: (1 tests)
[x] test: cpython/Lib/test/test_coroutines.py dependencies: dependent tests: (9 tests) [x] lib: cpython/Lib/concurrent dependencies:
dependent tests: (20 tests)
[x] lib: cpython/Lib/pkgutil.py dependencies:
dependent tests: (12 tests)
[x] lib: cpython/Lib/_colorize.py dependencies:
dependent tests: (280 tests)
[x] lib: cpython/Lib/contextlib.py dependencies:
dependent tests: (90 tests)
[ ] test: cpython/Lib/test/test_pyrepl (TODO: 19) dependencies: dependent tests: (no tests depend on pyrepl) [x] lib: cpython/Lib/calendar.py dependencies:
dependent tests: (29 tests)
[x] lib: cpython/Lib/pdb.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/bdb.py dependencies:
dependent tests: (3 tests)
[x] lib: cpython/Lib/idlelib dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/difflib.py dependencies:
dependent tests: (269 tests)
[x] lib: cpython/Lib/tomllib dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/zoneinfo dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/codeop.py dependencies:
dependent tests: (120 tests)
[x] test: cpython/Lib/test/test_positional_only_arg.py dependencies: dependent tests: (no tests depend on positional_only_arg) [x] test: cpython/Lib/test/test_exceptions.py (TODO: 2) dependencies: dependent tests: (no tests depend on exception) [x] lib: cpython/Lib/compileall.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/curses dependencies:
dependent tests: (5 tests)
[x] lib: cpython/Lib/webbrowser.py dependencies:
dependent tests: (9 tests)
[x] lib: cpython/Lib/pathlib dependencies:
dependent tests: (188 tests)
[x] lib: cpython/Lib/pydoc.py dependencies:
dependent tests: (6 tests)
[x] lib: cpython/Lib/subprocess.py dependencies:
dependent tests: (95 tests)
[x] test: cpython/Lib/test/test_cmd_line_script.py (TODO: 1) dependencies: dependent tests: (no tests depend on cmd_line_script) [x] lib: cpython/Lib/ftplib.py dependencies:
dependent tests: (40 tests)
[x] lib: cpython/Lib/modulefinder.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/wsgiref dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/_ios_support.py dependencies:
dependent tests: (31 tests) [ ] lib: cpython/Lib/ensurepip dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/re dependencies:
dependent tests: (85 tests)
[x] lib: cpython/Lib/mailbox.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/pickle.py dependencies:
dependent tests: (102 tests)
[x] lib: cpython/Lib/ast.py dependencies:
dependent tests: (168 tests)
[x] test: cpython/Lib/test/test_class.py (TODO: 2) dependencies: dependent tests: (no tests depend on class) [x] test: cpython/Lib/test/test_android.py dependencies: dependent tests: (no tests depend on android) [ ] lib: cpython/Lib/platform.py dependencies:
dependent tests: (35 tests)
[x] lib: cpython/Lib/argparse.py dependencies:
dependent tests: (281 tests)
[x] lib: cpython/Lib/profiling dependencies:
dependent tests: (3 tests)
[x] lib: cpython/Lib/collections dependencies:
dependent tests: (366 tests)
[x] test: cpython/Lib/test/test_type_cache.py dependencies: dependent tests: (no tests depend on type_cache) [x] test: cpython/Lib/test/test_dict.py (TODO: 1) dependencies: dependent tests: (no tests depend on dict) [ ] lib: cpython/Lib/test/support dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/_pyrepl dependencies:
dependent tests: (10 tests)
[x] lib: cpython/Lib/xml dependencies:
dependent tests: (38 tests)
[x] lib: cpython/Lib/imaplib.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/profile.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/turtle.py dependencies:
dependent tests: (no tests depend on turtle) [x] lib: cpython/Lib/py_compile.py dependencies:
dependent tests: (49 tests)
[x] test: cpython/Lib/test/test_complex.py (TODO: 1) dependencies: dependent tests: (no tests depend on complex) [x] test: cpython/Lib/test/test_external_inspection.py dependencies: dependent tests: (no tests depend on external_inspection) [x] lib: cpython/Lib/rlcompleter.py dependencies:
dependent tests: (6 tests)
[x] lib: cpython/Lib/test/libregrtest dependencies:
dependent tests: (no tests depend on regrtest) [x] lib: cpython/Lib/pstats.py dependencies:
dependent tests: (5 tests)
[x] lib: cpython/Lib/pyclbr.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/operator.py dependencies:
dependent tests: (43 tests)
[x] test: cpython/Lib/test/test_format.py dependencies: dependent tests: (no tests depend on format) [ ] lib: cpython/Lib/unittest dependencies:
dependent tests: (416 tests)
[x] lib: cpython/Lib/symtable.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/sqlite3 dependencies:
dependent tests: (2 tests)
[x] test: cpython/Lib/test/test_dtrace.py dependencies: dependent tests: (no tests depend on dtrace) [x] lib: cpython/Lib/runpy.py dependencies:
dependent tests: (8 tests)
[x] lib: cpython/Lib/cProfile.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/code.py dependencies:
dependent tests: (3 tests) [x] lib: cpython/Lib/pickletools.py dependencies:
dependent tests: (1 tests)
[x] test: cpython/Lib/test/test_remote_pdb.py dependencies: dependent tests: (no tests depend on remote_pdb) [x] test: cpython/Lib/test/test_grammar.py dependencies: dependent tests: (no tests depend on grammar) [x] test: cpython/Lib/test/test_sys.py (TODO: 4) dependencies: dependent tests: (246 tests)
[x] lib: cpython/Lib/keyword.py dependencies:
dependent tests: (284 tests)
Legend:
|
Summary
Remaining Python 3.15 integration, rebased onto canonical
mainat92e20da822ef511853d207da9ff2338e7c3a57f5, using official CPython v3.15.0, commitd220409a13b77de7a6c30abe16ea90db01528edc.This remains a broad integration draft while native changes and canonical library imports are separated into reviewable PRs. The Python-version transition in #8950 is merged. The merged #9127, #9130 and #9131 changes remain owned by main; its jiff-tzdb update is preserved.
Library provenance
Library changes are generated through
scripts/update_libfrom the pinned final reference, preserving applicable RustPython markers. Remaining unsupported migrations stay deferred; generated opcode metadata retains the current compiler schema.The CI repair migrates the old IO/OS test families into the 17 canonical final package files using the update script's explicit package-migration path. All 15 existing marker conditions/reasons and three inherited-method overrides are preserved. Generated file hashes still match the tool outputs after hooks and rebase. No manual Lib edits or discovery relaxation were used.
CI repairs
__name__-before-builtins lookup order.Current validation
Current source commit:
f32c093339c3fb501c559b4f4f8c05c806f8845c.A fresh matching release CLI build passed with no default features and
threading,stdlib,stdio,importlib,host_env; its embedded revision isf32c09333. Strict stdlib all-target Clippy (-D warnings) and all 20 static package-migration tooling tests passed.On that exact binary, with verified library origins and optimization disabled, the approved bounded checks all passed: bound-method exception ordering; discovery of 489 unique test modules including the 12 IO/OS children; frozen-map integration and Element.remove repr exception propagation; executable/symlink paths; cyclic and four-combination nested venv cases including parent deletion; and six individually selected OrderedDict view/pprint cases, with zero skips or expected failures. Each ran under its reviewed timeout/memory/process/output limits. The first attempt's Element.remove failure was preserved, fixed, rebuilt, and the complete approved sequence rerun successfully.
Hosted CI is pending on the updated head; no CI-green claim is made here.
Already completed on the integrated predecessor source: strict VM all-target Clippy with the C-API feature, wasm32-wasip1 VM compile, and the exact t-string compiler test. WASI compilation reports existing target-specific warnings; no WASI runtime was run. Normal commit hooks passed. Offline configured Zizmor comparison against the previously published workflow has four unchanged low-severity self-repository findings and no new findings; YAML-anchor warnings occur on both inputs.
The IO/OS check only enumerates canonical tests and proves that test modules were not imported. It does not execute the IO/OS suites. Full regression, concurrency/GC stress, and candidate C-API runtime suites were not run locally.
C-API scope
The abi3t-only correction defers the 20 new non-Limited monitoring C exports and their dedicated new test, plus the unneeded legacy
PyCFunction_Calladdition/test. The latter is historical Stable ABI compatibility, not a non-Stable function. Main's existing tests and Python/internal monitoring fixture path remain. The new WindowsPyFrame_GetLocalscompatibility exception is removed; main's existing implementation remains.The final source export names/kinds equal current main exactly: 555 symbols. The earlier correction at
1984aac7also passed an actual matching cdylibnmcomparison; that compiled-artifact result is scoped to that earlier build. The Windows definition has 514 generic Stable ABI symbols, including six already-main buffer APIs missing from the stale list. The generator uses the generic Stable ABI manifest: these are scoped no-expansion checks, not full abi3t certification or Windows PE runtime validation.Existing native config_get corrections add no C exports: live write_bytecode observes sys.dont_write_bytecode, and the context flags return integers. Candidate C-API runtime semantics remain unverified.
Remaining limits
This is not complete Python 3.15 compatibility. Hosted CI, deferred library migrations, full suites and platform-specific behavior still need validation. Bounded cases do not establish general concurrency, GC, XML parser or C-API lifetime safety.
AI assistance
Prepared with OpenAI Codex under the requesting maintainer's direction. The runtime does not expose an exact model identifier; commits disclose that limitation.