Provide detailed error for circular from imports#5972
Conversation
|
Warning Rate limit exceeded@ever0de has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 36 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe Changes
Poem
✨ 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Sorry, something went wrong.
9c09aef to
dfb4db1
Compare
July 14, 2025 15:04
dfb4db1 to
d86644e
Compare
July 14, 2025 15:07
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Lib/test/test_import/__init__.pyis excluded by!Lib/**
📒 Files selected for processing (3)
vm/src/builtins/module.rs(3 hunks)vm/src/frame.rs(2 hunks)vm/src/import.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .github/copilot-instructions.md
🧠 Learnings (2)
vm/src/builtins/module.rs (1)
Learnt from: CR
PR: RustPython/RustPython#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T10:08:48.858Z
Learning: Applies to **/*.rs : Use the macro system (`pyclass`, `pymodule`, `pyfunction`, etc.) when implementing Python functionality in Rust
vm/src/import.rs (1)
Learnt from: CR
PR: RustPython/RustPython#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T10:08:48.858Z
Learning: Applies to **/*.rs : Use the macro system (`pyclass`, `pymodule`, `pyfunction`, etc.) when implementing Python functionality in Rust
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Run snippets and cpython tests (windows-latest)
🔇 Additional comments (4)
vm/src/builtins/module.rs (2)
1-1: LGTM! Atomic boolean field properly added for initialization tracking.The
AtomicBoolimport and field addition are appropriate for tracking module initialization state in a thread-safe manner.Also applies to: 57-57
80-80: Field initialization is correct in both constructors.The
initializingfield is properly initialized tofalsein bothnew()andfrom_def()constructors, ensuring modules start in a non-initializing state.Also applies to: 88-88
vm/src/import.rs (2)
3-3: Imports correctly added for atomic operations.The
Orderingimport andPyModuleaddition are necessary for the initialization tracking implementation.Also applies to: 7-7
161-178: Well-implemented guard pattern for initialization tracking.The guard ensures the
initializingflag is always reset, even if module code execution fails or panics. The use ofOrdering::Relaxedis appropriate here.However, this sets an internal field that isn't exposed to Python code. The
frame.rscode checks__spec__._initializing, which is a different attribute. Consider exposing this state to Python.
Sorry, something went wrong.
Sorry, something went wrong.
2d99040 to
69c0294
Compare
July 14, 2025 16:09
youknowone
left a comment
There was a problem hiding this comment.
nice feature! Thanks!
Sorry, something went wrong.
d4f85cf
into
RustPython:main
Jul 14, 2025
Summary by CodeRabbit
Bug Fixes
New Features