Repository navigation
Use globals module names for eval and exec warnings - #9294
Conversation
Forward the supplied scope module through compilation warnings while preserving typed compile entrypoints and missing-name filename fallback.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters: 1
📒 Files selected for processing: 2
✨ Finishing Touches
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 |
Regenerate test_builtin through update_lib with all other adaptations preserved after hosted CI reports the canonical method succeeds.
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_builtin.py (TODO: 2) dependencies: dependent tests: (no tests depend on builtin) Legend:
|
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. |
Summary
Continues the Python 3.15 upgrade decomposition from #8954.
Pass
globals['__name__']through the existing compilation-warning path for string inputs toeval()andexec(), matching CPython's_PyRun_Stringbehavior.This lets warning filters match the supplied module instead of incorrectly falling back to
<string>. A missing name still uses filename fallback; an explicitly suppliedNoneretains CPython's warning-suppression behavior. Typed compile/symtable/interactive entrypoints remain intact, includingcompile(module=...)validation.The behavior change is limited to two native files. It does not change warning ordering, numeric-warning metadata, parser recovery, or existing filename/callback handling. This does not incorporate the separate unmerged work in #9282.
A test-marker-only follow-up removes the now-stale
expectedFailureonBuiltinTest.test_exec_filter_syntax_warnings_by_moduleusing the canonicalscripts/update_lib migrateworkflow. The complete canonical method body, fixture and every other local adaptation remain unchanged. Hosted RustPython CI on the initial head reported that method as an unexpected success both initially and on its own rerun; that old run remains failed, not green.Validation
Tested native base:
ad8bd18f341445761fc57b1080db6e6e8e0e10e7. The following native/local results were established before the test-marker-only follow-up; native source is byte-for-byte unchanged.capiCLI builds for baseline and candidate, with actual native compilation inputs verified, including host_env/CAPI.d220409a13b77de7a6c30abe16ea90db01528edc: baseline 5/11, candidate and oracle 11/11. All candidate observation records match the oracle, including captured warning messages.The observations use fresh owned dictionaries and fixed literal expressions/assignments, in independent
-Bprocesses with 120-second timeouts and 1 GiB address-space limits. They are external finite observations, not execution of canonical test modules, the ZIP fixture, or the full suite. The CAPI-linked CLI builds do not constitute CAPI runtime validation; Rust test targets were checked, not executed.The updater-generated follow-up has passed source-identity checks and normal changed-file hooks. It does not add a native build or a full local suite run. New-head hosted CI is pending.
Prepared and validated with AI assistance.