Repository navigation
Preserve symtable warning exceptions and original filenames - #9282
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Propagate original filenames in warnings crates/vm/src/vm/compile.rs |
Compilation warning data and dispatch paths carry an optional original filename. Warning emission and exception filenames use it when present, and otherwise use the internal filename. |
Handle symbol-table compilation outcomes crates/vm/src/stdlib/_symtable.rs |
Symbol-table compilation assigns the filename to compile errors. It propagates warning-hook exceptions without modifying their attributes. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
- RustPython/RustPython#9304: Both changes modify parser-warning emission in
compile.rs; this change forwards original filenames, while#9304filters warnings by single-input boundaries. - RustPython/RustPython#9316: Both changes modify warning collection and emission in
compile.rs; this change forwards original filenames, while#9316changes the standardexecandevalwarning path and tokenizer-recovery decision.
Suggested reviewers: youknowone
Merge Risk: 
Minimal · up to 26005
-
No actionable issue was found in the changed filename and exception-handling paths. The reviewed head is mergeable after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
d1e397a to
98a78ef
Compare
Keep warning-hook exceptions untouched instead of rewriting SyntaxError subclasses. Thread the original Python filename through parser warning emission and fresh warning-as-error SyntaxError construction, preserving fsdecoded bytes paths and lone surrogates. Assisted-by: OpenAI Codex:model-version-unavailable
98a78ef to
26005cf
Compare
Integrate main at 5bccf31 without replacing the existing Ruff vendor. Preserve the landed Cranelift dependency family and RustPython#9282 original filename handling, including surrogate/bytes filenames and arbitrary warning-hook exceptions. Thread the same filename object through remaining mega numeric and relative-lazy warning/recovery paths without changing event ordering. The preceding signal correction restores RustPython#9199 pending-error preservation; it does not claim immediate post-fork delivery. Keep all tests unchanged. Assisted-by: OpenAI Codex: model version unavailable
* Align offline profiler argument binding with Python 3.15 Accept the canonical keyword names for binary sample writes and native context exits. Resolve the argument layout before numeric callbacks, then preserve float-subclass payloads while accepting numeric protocols for required and optional profile statistics. AI-assisted source extraction, implementation, and source review with OpenAI Codex. Runtime validation remains pending. Assisted-by: OpenAI Codex:model version unavailable * Restore the offline profiler capability flag Preserve the original mega branch's zero-valued process_vm_readv capability export. The native live unwinder remains unsupported; this restores the public feature query without claiming live inspection support or changing canonical test helpers. AI-assisted source preservation and review with OpenAI Codex. Assisted-by: OpenAI Codex:model version unavailable * Restore finite-EOF table bounds for offline profiles Match CPython's EOF-wide table count and decoding windows while retaining checked offsets, allocation limits, cursor bounds, and replay checks. This restores the original mega's finite-file contract without changing canonical tests or the already validated argument-binding implementation. Assisted-by: OpenAI Codex:model version unavailable * Preserve symtable warning exceptions and original filenames (#9282) Keep warning-hook exceptions untouched instead of rewriting SyntaxError subclasses. Thread the original Python filename through parser warning emission and fresh warning-as-error SyntaxError construction, preserving fsdecoded bytes paths and lone surrogates. Assisted-by: OpenAI Codex:model-version-unavailable * build(deps): align the Cranelift 0.136 dependency family (#9341) * build(deps): bump the wasmtime group across 1 directory with 2 updates Bumps the wasmtime group with 2 updates in the / directory: [cranelift](https://github.com/bytecodealliance/wasmtime) and [cranelift-module](https://github.com/bytecodealliance/wasmtime). Updates `cranelift` from 0.135.2 to 0.136.3 - [Release notes](https://github.com/bytecodealliance/wasmtime/releases) - [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md) - [Commits](https://github.com/bytecodealliance/wasmtime/commits) Updates `cranelift-module` from 0.135.3 to 0.136.3 - [Release notes](https://github.com/bytecodealliance/wasmtime/releases) - [Changelog](https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md) - [Commits](https://github.com/bytecodealliance/wasmtime/commits) --- updated-dependencies: - dependency-name: cranelift dependency-version: 0.136.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: wasmtime - dependency-name: cranelift-module dependency-version: 0.136.3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: wasmtime ... Signed-off-by: dependabot[bot] <[email protected]> * Align cranelift-jit with the 0.136 dependency family Update cranelift-jit alongside cranelift and cranelift-module so the JIT shares their LibCall, FuncId, and Module trait identities. Regenerate only the affected dependency lock entries, preserving the original dependency PR changes. AI assistance covered the dependency diagnosis, alignment, and static review. Assisted-by: OpenAI Codex:model-version-unavailable --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Support selective canonical function migration Add hash-pinned function selection to the official Lib migration tool, preserving canonical source bytes and rejecting ambiguous dependencies. Assisted-by: OpenAI Codex:model version unavailable * Detect CPython runtimes for canonical inspection feature checks Add native runtime-cookie detection and import the exact Python 3.15 inspection helpers and tests through the official Lib migration tool. Preserve the offline profiler argument and finite-EOF corrections. Assisted-by: OpenAI Codex:model version unavailable --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Summary
SyntaxErrorsubclasses. Only compiler-generated syntax errors enter the filename-rewriting path.SyntaxErrorobjects, including byte paths and lone surrogates.Lib, test, warning-threshold, or skip changes.Validation of
26005cf386111e95197857a940d7afef5338df6c-D warnings), default-feature CLI build, independent source review, and normal commit hooks.test_symtablemethods passed without skips. All 14 bounded filename/exception-identity observations passed against the preserved CPython 3.15 reference from sourced220409a13b77de7a6c30abe16ea90db01528edc.SyntaxError.args; their recorded filename and location fields match. No normalization or complete diagnostic-metadata parity is claimed.TYPE_COMMENTSobservations exactly match every recorded field of landed Fix interpolated string warning diagnostic locations #9314. Its existing differences from CPython remain, including syntax-error ranges under thealwaysfilter and exception argument representations. These are preservation checks, not a claim of full CPython parity.Windows CI on this head passed the formerly failing RustPython
stdlib_io_blocking_buffersnippet. The snippet summary is 502 passed, four skipped, and 15 subtests passed; the CPython test step also succeeded. The historical GC timing failure still has no established root cause; this PR does not alter its timing threshold or claim a GC fix.