Repository navigation
Fix module docstring global name resolution - #9095
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
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. |
|
oh I just saw the pr you mentioned. Sorry if you were already working on this. Please let me know if there's any overlap with your work. |
|
@teddygood This PR is mentioned as seperated independent patch. Please go ahead, thanks! |
Assisted-by: Claude Code:claude-opus-5-5
b3ea04e to
11b9773
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
let's add this test to extra_tests/snippets/syntax_doc.py
There was a problem hiding this comment.
Moved it into syntax_doc.py, thanks!
Assisted-by: Claude Code:claude-opus-5-5
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9998e3369
ℹ️ 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".
| src_global = '"module doc"\ndef f():\n global __doc__\n' | ||
| code, g, loc = run_split(src_global) | ||
| ops = opnames(code) | ||
| assert "STORE_GLOBAL" in ops, ops |
There was a problem hiding this comment.
Remove the prohibited test-logic additions
This adds a new assertion, and the surrounding regression block adds new test logic and data, to extra_tests/snippets/syntax_doc.py. The repository rules explicitly forbid modifying test assertions, logic, or data and state that only expectedFailure decorator changes are acceptable, so this test block must be removed rather than landed with the Rust fix.
AGENTS.md reference: AGENTS.md:L275-L279
Useful? React with 👍 / 👎.
One of checkbox below must be checked.
Summary
compile_programstored the module docstring with a hard-codedStoreName, so aglobal __doc__declaration in a nested function was ignored. Any other name in the same position follows the declaration.Before:
After (same as CPython 3.15):
The docstring is now stored through
store_name, like every other module-level assignment. Without such a declaration the emitted instruction is unchanged.AI assistance
Written with Claude (Opus 5.5), reviewed by a human before submission.
Summary by CodeRabbit
global __doc__.