Skip to content

Add canonical Python 3.15 optional native integration sources - #9368

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:split/python315-optional-native-sources
Oct 26, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:split/python315-optional-native-sources

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Extract a coherent optional-native integration source/test slice from #8954 using final CPython v3.15.0 (d220409a13b77de7a6c30abe16ea90db01528edc) and scripts/update_lib.

  • Add the canonical curses frontend package and its automated/interactive tests, plus the GNU/ndbm and Tcl tests.
  • Update the DTrace test and matching SystemTap call-stack script.
  • Keep all 12 files' bytes and modes canonical, including the executable interactive curses helper. Preserve upstream native-module/resource/configuration gates without new skips or compatibility shims.

This distributes source; it does not implement or validate native curses/DBM functionality, enable the optional tkinter Cargo feature, or validate tracing probes. The current bundled runtime still cannot import curses without _curses; DBM production backend selection is unchanged. Module discoverability and import-error details can change with newly present source files, and customized embeddings with supplied native modules are not claimed unchanged.

Validation

  • Independent canonical blob/mode and source dependency/gating review.
  • Eleven Python files parsed as host AST data without importing or executing modules.
  • Normal affected hooks and normal commit hooks passed.
  • cargo check --locked --offline --bin rustpython passed.
  • cargo check --locked --offline --features freeze-stdlib --bin rustpython passed; this compiles Python source into bytecode without executing module decorators.
  • Current automatic runtime CI feature sets omit tkinter; canonical native-import gates still apply even with -u all. The builtin sysconfig data does not enable WITH_DTRACE, so its canonical early gate precedes backend/probe setup. The interactive curses_tests.py helper is outside test_ discovery.

No project module imports, runtime tests, terminal operations, native database/Tcl operations, or DTrace/SystemTap/BPFTrace probes were executed locally. Full workspace/C API and cross-platform native-runtime suites remain unrun; compile checks are not native feature validation.

AI assistance: OpenAI Codex prepared this extraction, performed static reviews, and ran the recorded compile-only checks and hooks. Model version was unavailable.

Copy curses frontend sources and canonical curses, DBM, Tcl and DTrace
integration tests from CPython v3.15.0 through update_lib. Preserve
upstream optional-native/resource/configuration gates and canonical file
modes, without adding native implementations or custom skips.

Validate source identity, hooks and default/frozen compile-only checks.
Native runtime integration and probe execution remain unvalidated.

Assisted-by: OpenAI Codex: model version unavailable
@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] lib: cpython/Lib/dbm
[ ] test: cpython/Lib/test/test_dbm.py (TODO: 2)
[x] test: cpython/Lib/test/test_dbm_dumb.py
[x] test: cpython/Lib/test/test_dbm_gnu.py
[x] test: cpython/Lib/test/test_dbm_ndbm.py
[x] test: cpython/Lib/test/test_dbm_sqlite3.py

dependencies:

  • dbm

dependent tests: (5 tests)

  • dbm: test_dbm test_dbm_dumb test_dbm_ndbm test_dbm_sqlite3 test_shelve

[x] lib: cpython/Lib/tkinter
[x] test: cpython/Lib/test/test_tkinter
[x] test: cpython/Lib/test/test_ttk
[x] test: cpython/Lib/test/test_ttk_textonly.py
[x] test: cpython/Lib/test/test_tcl.py

dependencies:

  • tkinter

dependent tests: (7 tests)

  • tkinter: test_genericalias test_pyrepl test_tcl test_tkinter test_ttk test_ttk_textonly
    • idlelib: test_idle

[x] lib: cpython/Lib/curses
[x] test: cpython/Lib/test/test_curses.py
[x] test: cpython/Lib/test/curses_tests.py

dependencies:

  • curses

dependent tests: (3 tests)

  • curses: test_curses test_pyrepl
    • profiling.sampling.sample: test_profiling

[ ] lib: cpython/Lib/profiling
[ ] test: cpython/Lib/test/test_profiling

dependencies:

  • profiling (native: main, _child_monitor, _css_utils, _format_utils, _lsprof, _remote_debugging, binary_collector, binary_reader, cli, collector, constants, display, dump, errors, gecko_collector, heatmap_collector, importlib.machinery, importlib.resources, importlib.util, itertools, jsonl_collector, live_collector, marshal, math, module_utils, opcode_utils, profiling.tracing, profiling.tracing._utils, pstats_collector, sample, stack_collector, string_table, sys, time, trend_tracker, widgets)
    • io (native: _io, _thread, errno, msvcrt, sys)
    • opcode (native: _opcode, builtins)
    • platform (native: _wmi, itertools, sys, vms_lib, winreg)
    • site (native: _io, _pyrepl.main, _pyrepl.pager, _pyrepl.readline, _pyrepl.unix_console, _pyrepl.windows_console, atexit, builtins, errno, readline, sitecustomize, sys, usercustomize)
    • sysconfig (native: _sysconfig, _winapi, importlib.machinery, importlib.util, os.path, sys)
    • _colorize, abc, argparse, base64, collections, contextlib, curses, dataclasses, functools, html, json, linecache, locale, optparse, os, pathlib, pstats, re, runpy, selectors, socket, statistics, subprocess, tempfile, threading, traceback, types, typing, uuid, webbrowser

dependent tests: (3 tests)

  • profiling: test_profiling
    • cProfile: test_cprofile test_pstats

[x] test: cpython/Lib/test/test_dtrace.py

dependencies:

dependent tests: (no tests depend on dtrace)

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

@youknowone
youknowone marked this pull request as ready for review October 26, 2026 01:10
@youknowone
youknowone merged commit dca9dfd into RustPython:main Oct 26, 2026
21 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-26T01:11:52.168565Z
We couldn’t complete this review. Comment @codex review to try again.
c6467c6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants