-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix error / warning messages #6594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis PR introduces deprecation warnings for multi-argument throw signatures across async generators, coroutines, and generators. It enhances error messages for function positional argument mismatches and updates PyPartial's module attribute and representation logic. Changes
Sequence DiagramsequenceDiagram
participant AsyncGen as AsyncGenerator/Coroutine/Generator
participant Warn as warn_deprecated_throw_signature()
participant VM as VirtualMachine
participant Inner as Inner throw()
AsyncGen->>Warn: Call with exc_val, exc_tb
alt exc_val or exc_tb present
Warn->>VM: Emit deprecation warning
VM-->>Warn: PyResult
rect rgb(200, 220, 240)
Note over Warn: If hook raises,<br/>error propagates
end
Warn-->>AsyncGen: Result (Ok or Err)
else Both absent
Warn-->>AsyncGen: Ok(())
end
alt warn_result is Ok
AsyncGen->>Inner: Proceed with throw()
Inner-->>AsyncGen: Result
else warn_result is Err
rect rgb(240, 200, 200)
Note over AsyncGen: Control flow altered:<br/>throw aborted, error returned
end
AsyncGen-->>AsyncGen: Return error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (1)**/*.rs📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-12-27T14:03:49.034ZApplied to files:
🧬 Code graph analysis (5)crates/vm/src/coroutine.rs (1)
crates/vm/src/stdlib/functools.rs (2)
crates/vm/src/builtins/coroutine.rs (1)
crates/vm/src/builtins/generator.rs (1)
crates/vm/src/builtins/asyncgenerator.rs (1)
🔇 Additional comments (14)
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 |
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.