Update interactive compile-error recovery to CPython 3.15.2 by youknowone · Pull Request #9936 · RustPython/RustPython
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, andtest_pyreplcrashed withSTATUS_STACK_OVERFLOWwhile 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 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. Share |
github-actions
Bot
commented
Nov 18, 2026
Copy link Copy Markdown
Contributor
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/_pyrepl dependencies:
dependent tests: (10 tests)
[x] lib: cpython/Lib/pdb.py dependencies:
dependent tests: (2 tests)
[x] lib: cpython/Lib/code.py dependencies:
dependent tests: (3 tests) Legend:
|
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: CodexSign up for free to join this conversation on GitHub . Already have an account? Sign in to comment