« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
GitHub · Extracted in 1547 ms

Update interactive compile-error recovery to CPython 3.15.2 by youknowone · Pull Request #9936 · RustPython/RustPython

Source: https://github.com/RustPython/RustPython/pull/9936

Repository navigation

Update interactive compile-error recovery to CPython 3.15.2 - #9936


Draft
youknowone wants to merge 1 commit into main from dot/interactive-compile-errors-3152
Draft

Update interactive compile-error recovery to CPython 3.15.2 #9936 youknowone wants to merge 1 commit into main from dot/interactive-compile-errors-3152

Conversation

youknowone commented Nov 18, 2026 · edited Loading



Copy link Copy Markdown
Member

Summary

Part of #9852 . Synchronize the related code, pdb, and _pyrepl changes using scripts/update_lib:

  • Handle compile-time exceptions beyond SyntaxError, including RecursionError, without terminating interactive sessions.
  • Convert interactive prompts to strings and fall back safely when conversion fails.
  • Import the matching canonical CPython 3.15.2 regressions, including nested breakpoints and comprehension stepping. No original tests or update_lib-tool tests are added.
  • Preserve existing pdb doctest guards and its RustPython checker using explicitly reviewed migration metadata; all 27 existing TODO annotations remain. Remove an obsolete unused unittest import in test_reader.

Validation

Linux x86_64, existing main bf68333 interpreter (default features + sqlite), Rust 1.100:

  • Full test_code_module test_pdb test_pyrepl: 618 tests run, 113 skipped, all three modules passed .
  • CPython 3.15.2 reference: the same three modules 618 run, 77 skipped, passed .
  • Focused new pdb compile-error cases, nested breakpoint, and both comprehension-stepping doctests pass. No native AST changes are involved; the local Linux main interpreter reports RecursionError for the canonical deep input. This result is not portable: the Windows CI run below crashes on that input.
  • Normal commit hooks passed: merge conflicts, Ruff format/check, redundant test patch check. Rustfmt, cspell and prettier had no applicable files. Remote tree is identical to the hook-checked local tree.

Limits

Existing platform/resource/optional-feature skips remain; no skip or expectedFailure was added. A separate raw unittest invocation was stopped at its 90-second bound and is not counted as a suite pass; the supported regrtest invocation above completed successfully. The local validation above did not include workspace Rust/C-API tests, a Clippy rebuild, Windows/macOS/WASI execution, or performance measurement. CAPI remains deferred.

CI results (head 05ede64eb42da954940e984a9f6ca9cfba775094)

CI run completed with failure:

  • Linux and macOS snippets and CPython test steps passed.
  • Windows snippets passed, but test_code_module, test_pdb, and test_pyrepl crashed with STATUS_STACK_OVERFLOW while compiling the canonical input containing 100,000 unary - operators. The automatic retries also crashed. This remains unresolved; this PR does not fix the native deep-input failure or establish cross-platform recovery. Windows failure log .
  • Windows checks following the failed Python suite (environment-polluter, pip/ensurepip/venv and whats_left checks) were skipped.
  • Rust/C-API and WASI test steps were skipped despite successful wrapper-job labels. Clippy, Miri, cross-target checks, cargo doc/shear, and WASM package/demo jobs were skipped.
  • CodSpeed's build and benchmark steps were skipped; pyperformance was skipped. No performance measurement was made.

AI-assisted by OpenAI Codex under maintainer direction; exact model version is not exposed, so the commit trailer records model-unspecified.

Update interactive compile-error recovery to CPython 3.15.2 05ede64
Assisted-by: Codex:model-unspecified

coderabbitai
Bot
commented Nov 18, 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

github-actions
Bot
commented Nov 18, 2026



Copy link Copy Markdown
Contributor

📦 Library Dependencies

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

[x] lib: cpython/Lib/_pyrepl
[ ] test: cpython/Lib/test/test_pyrepl (TODO: 2)
[ ] test: cpython/Lib/test/test_repl.py (TODO: 3)

dependencies:

  • _pyrepl

dependent tests: (10 tests)

  • _pyrepl: test_pyrepl test_repl
    • pdb: test_pdb test_remote_pdb
    • pydoc: test_enum test_pydoc
      • xmlrpc.server: test_docxmlrpc test_xmlrpc
    • site: test_site
      • profiling.sampling.heatmap_collector: test_profiling

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

dependencies:

  • pdb

dependent tests: (2 tests)

  • pdb: test_pdb test_remote_pdb

[x] lib: cpython/Lib/code.py
[x] test: cpython/Lib/test/test_code_module.py

dependencies:

  • code

dependent tests: (3 tests)
- [x] pdb: test_pdb test_remote_pdb
- [x] sqlite3. main : test_sqlite3

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated
youknowone pushed a commit that referenced this pull request Dec 1, 2026 Preserve interactive compile-error recovery with bounded AST disposal (... 5b8c719
...#10101)

Keep parsed syntax owned on diagnostic exits and release discarded syntax in bounded chunks. Preserve the CPython 3.15.2 Lib changes and canonical regression tests from #9936 after #10084.

Assisted-by: Codex
Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

1 participant