Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Synchronize developer tools with Python 3.15 - #9298

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:upgrade-py315-developer-tools-20261022
Oct 22, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:upgrade-py315-developer-tools-20261022

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor

Summary

Sync a coherent set of developer tools to CPython 3.15.0 (d220409a13b77de7a6c30abe16ea90db01528edc) using scripts/update_lib:

  • Update pdb's canonical input/pyrepl integration, rc-path deduplication, initial state and command/display handling.
  • Remove unreachable C-event handling from bdb's Python trace dispatcher, matching the existing native separation of trace and profile events.
  • Add namespace-package handling to modulefinder, including the canonical regression test and explicit compile(module=...) context.
  • Sync codeop's unused exception-binding cleanup.

All five changed files are byte-identical to the pinned upstream sources. Existing test_pdb/test_bdb adaptations are untouched. This splits the corresponding Lib changes from #8954; it does not add remote debugger support or change native code.

Existing prerequisites

Current main already exports importlib.machinery.NamespacePath, accepts compile(module=...), filters C events out of sys.settrace, and provides the pyrepl APIs used by the synchronized debugger.

Validation

  • Applicable configured hooks pass; exact changed-file scope and canonical source hashes verified afterward.
  • Guarded compile-only: all five files pass on pinned CPython 3.15.0 and unchanged-main RustPython. Compiled code objects were not executed by this gate.
  • Exactly three unchanged canonical modulefinder selectors pass on unchanged-main RustPython: test_namespace_package, test_package, test_maybe, with no skips. Execution used an isolated owned temporary tree and resource limits.
  • Extracted unchanged upstream test_pyrepl_available passes against the hash-pinned canonical helper with inert modules; no real terminal discovery or Pdb construction. This upstream test is not present in retained current test_pdb.
  • A new external two-case helper observer passes for ordinary and async definitions against hash-pinned find_function/find_first_executable_line; fixture code is compiled/disassembled, never executed. This is external finite validation, not a canonical test added to the repository.

No broad test_pdb/test_bdb run, interactive TTY integration, arbitrary rc execution, live tracing/attach or remote debugging was exercised. Source prerequisite review and compile-only validation do not prove those behaviors. The extracted/mocked checks above cover only their named helper paths, not the whole debugger.

AI assistance

OpenAI Codex assisted with source selection, scripts/update_lib synchronization, dependency review, bounded validation and this PR description. The changed library/test files are exact pinned CPython sources, not newly generated implementations. The model identifier is unavailable.

Regenerate bdb, pdb, codeop, modulefinder and the canonical modulefinder
test using scripts/update_lib at CPython 3.15.0
d220409a13b77de7a6c30abe16ea90db01528edc.

AI-assisted source selection, synchronization, dependency review and
bounded validation using OpenAI Codex.

Assisted-by: Codex:unknown
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters: 5
  • Lib/bdb.py is excluded by !Lib/**
  • Lib/codeop.py is excluded by !Lib/**
  • Lib/modulefinder.py is excluded by !Lib/**
  • Lib/pdb.py is excluded by !Lib/**
  • Lib/test/test_modulefinder.py is excluded by !Lib/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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/codeop.py
[x] test: cpython/Lib/test/test_codeop.py

dependencies:

  • codeop

dependent tests: (112 tests)

  • codeop: test_codeop
    • code:
      • pdb: test_pdb
      • sqlite3.main: test_sqlite3
    • traceback: test_asyncio test_builtin test_code_module test_concurrent_futures test_contextlib test_contextlib_async test_coroutines test_dictcomps test_exceptions test_http_cookiejar test_importlib test_iter test_listcomps test_pyexpat test_setcomps test_socket test_ssl test_subprocess test_sys test_threadedtempfile test_threading test_traceback test_unittest test_with test_zipimport
      • concurrent.futures.interpreter: test_concurrent_futures
      • concurrent.futures.process: test_compileall test_concurrent_futures
      • http.cookiejar: test_urllib2
      • logging: test_asyncio test_decimal test_genericalias test_hashlib test_logging test_pkgutil test_support test_unittest test_urllib2net
      • multiprocessing: test_asyncio test_concurrent_futures test_fcntl test_importlib test_memoryview test_multiprocessing_forkserver test_multiprocessing_main_handling test_profiling test_re
      • py_compile: test_cmd_line_script test_importlib test_modulefinder test_py_compile test_pydoc test_runpy
      • pydoc: test_enum
      • site: test_site
      • socketserver: test_imaplib test_socketserver test_wsgiref
      • threading: test_android test_asyncio test_bytes test_bz2 test_code test_concurrent_futures test_context test_ctypes test_docxmlrpc test_email test_enumerate test_external_inspection test_fork1 test_frame test_ftplib test_functools test_gc test_httplib test_httpservers test_importlib test_inspect test_io test_ioctl test_itertools test_linecache test_opcache test_pathlib test_poll test_poplib test_pyrepl test_queue test_robotparser test_sched test_signal test_smtplib test_sqlite3 test_super test_syslog test_termios test_threading_local test_time test_urllib2_localnet test_weakref test_winreg test_xmlrpc test_zstd
      • timeit: test_timeit
      • tkinter: test_pyrepl test_tkinter test_ttk test_ttk_textonly

[x] lib: cpython/Lib/modulefinder.py
[x] test: cpython/Lib/test/test_modulefinder.py

dependencies:

  • modulefinder

dependent tests: (2 tests)

  • modulefinder: test_importlib test_modulefinder

[x] lib: cpython/Lib/pdb.py
[ ] test: cpython/Lib/test/test_pdb.py (TODO: 30)

dependencies:

  • pdb

dependent tests: (1 tests)

  • pdb: test_pdb

[x] lib: cpython/Lib/bdb.py
[x] test: cpython/Lib/test/test_bdb.py (TODO: 1)

dependencies:

  • bdb

dependent tests: (2 tests)

  • bdb: test_bdb test_pdb

Legend:

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

@youknowone
youknowone marked this pull request as ready for review October 22, 2026 09:14
@youknowone
youknowone enabled auto-merge (squash) October 22, 2026 09:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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 ✅ Completed 2026-10-22T09:26:24.491221Z 2e15601 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e15601f84

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +368 to +369
def test_namespace_package(self):
self._do_test(namespace_package_test)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the prohibited test-case addition

This adds executable test logic and accompanying test data even though the repository's critical test policy limits test-file changes to adding expected-failure decorators or removing them when tests pass; adding a new canonical regression case is not one of the permitted changes. Keep Lib/test/test_modulefinder.py unchanged and validate this behavior through permitted implementation-focused checks.

AGENTS.md reference: AGENTS.md:L276-L282

Useful? React with 👍 / 👎.

Comment thread Lib/modulefinder.py
Comment on lines +462 to +463
if isinstance(pathname, importlib.machinery.NamespacePath):
m.__path__ = pathname

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Snapshot namespace paths in ModuleFinder

When analyzing a nested namespace such as a.b, ModuleFinder.find_module() passes only the part name (b) into _find_module(), so retaining this object gives it an internal name of b rather than a.b. At the next PathFinder.invalidate_caches(), it recalculates from global sys.path; if an unrelated top-level namespace b is present, a.b.__path__ changes from .../a/b to .../b and import a.b.c is incorrectly reported missing. Snapshot the discovered locations, or otherwise preserve ModuleFinder's fully qualified parent context, before assigning __path__.

Useful? React with 👍 / 👎.

Comment thread Lib/pdb.py
from _pyrepl.simple_interact import run_multiline_interactive_console
self.message(banner)
try:
run_multiline_interactive_console(console)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore PyRepl globals after interact exits

When a TTY-hosted script, rather than an already-running PyRepl, enters Pdb, runs interact, and then resumes, this helper calls _pyrepl.readline._setup() (Lib/_pyrepl/readline.py:610-646), which replaces builtins.input and installs a completer holding the stopped-frame namespace without any teardown. Exiting the interact console therefore permanently changes subsequent input() calls and leaves stale retained completion state; use the instance's existing reader or restore PyRepl's process-global state in a finally block.

Useful? React with 👍 / 👎.

Comment thread Lib/pdb.py
Comment on lines +785 to +787
'stdin': self.pyrepl_input,
'use_rawinput': False,
'prompt': '',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve nested debugger prompt state

When PyRepl is active, this clears self.prompt for the whole command dispatch, but nested loops are entered before the context exits: do_debug() builds its child prompt from the now-empty value and passes self.stdin (a wrapper bound to the outer Pdb), while do_commands() sets (com) yet the wrapper continues to render its fixed (Pdb) prompt and outer completions. Thus recursive and breakpoint-command sessions display incorrect prompts and complete against the wrong debugger; keep the logical prompt intact and suppress only cmd.Cmd's direct rendering, or rebind the wrapper per nested loop.

Useful? React with 👍 / 👎.

@youknowone
youknowone merged commit ccab27c into RustPython:main Oct 22, 2026
22 checks passed
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