Repository navigation
Propagate module initialization and attribute control errors - #9712
Conversation
Assisted-by: OpenAI Codex:model version not exposed
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
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. |
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Align Python 3.15 ModuleType initialization, attribute and annotation controls in nine Rust source files (+161/-149).
Validation
Compared against pinned CPython d220409a13b77de7a6c30abe16ea90db01528edc moduleobject.c and import.c. All 45 external reference checks pass, including collisions in all five initialization writes, annotation dictionary overrides, dictionary-subclass bypass, callback failures, descriptor fallback and optional lookup behavior. Independent source/lifetime review passed, including the native initialization callers and generated module helper.
Final threaded cargo check passed (1m12s), all-target Clippy passed (3m11s) with exactly the 12 unchanged baseline diagnostics, and normal commit hooks passed. The final lifetime oracle also passed independently in three fresh CPython processes.
Limits and integration
The initialization panic path is source-established, not a native RustPython crash reproduction. Native execution remains unperformed because its required safety guard is not verified. No repository tests, markers, Lib files or workflows were changed. Hosted runtime CI remains necessary.
The changed WebAssembly call site was source-reviewed but its separate wasm/non-threaded dependency graph was not compiled locally due limited disk space. The threaded VM/stdlib check does not substitute for that target validation.
The existing public new_module wrapper remains infallible for callback-free dictionaries. External embedders supplying user-controlled dictionaries must use try_new_module. All in-tree pre-initialization dictionary callers were reviewed; WebAssembly's executed-globals path is migrated.
#9700's Unicode annotation-result diagnostic change remains separate and should be preserved on composition. Existing import-from name/sys.modules suppression and file fallback differences, super error controls, and broader import behavior are outside this patch. The shared spec changes do not claim full import diagnostic parity.