| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Repository: RustPython/RustPython/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: 8fa2a349-3005-46b8-8f61-0e678257f73e 📥 CommitsReviewing files that changed from the base of the PR and between 1736c0d and d2e0200. 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 Walkthrough WalkthroughCode-object conversion now uses the VM to handle bytecode and frozen-code constants. Code-object construction moves from Context to VirtualMachine, and existing callers are updated. A compiler-feature-gated test checks set constants in membership and iteration. ChangesCode-object creation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to d2e02 No actionable issue remains in the supplied review evidence; this change is ready for normal merge checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to d2e02 The public embedding API requires migration, but inspected construction paths remain separate from code execution. No introduced security weakness was established; external consumers and malformed-input failure containment remain incompletely assessed. Retained concerns Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
❌ Failed checks (1 warning)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
Merging this PR will not alter performance✅ 62 untouched benchmarks Comparing youknowone:frozenset-const-vm (1736c0d) with main (456a8dc) Footnotes
|
Sorry, something went wrong.
PyObjBag built code object constants from a Context alone, and its
frozenset arm was unimplemented!(), so ctx.new_code() panicked on code
containing a frozenset constant such as `x in {1, 2, 3}`.
IntoCodeObject now takes a VirtualMachine and uses PyVmBag for bytecode
and frozen code objects. Context::new_code, PyObjBag and
AsBag for &Context are removed; callers use VirtualMachine::new_code.
Assisted-by: Claude:claude-opus-5-5
Assisted-by: Grok:grok-4.7
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
close #8823
Summary
PyObjBag built code object constants from a Context alone. Its frozenset arm was unimplemented!(), so ctx.new_code() panicked on any code containing a frozenset constant, e.g. x in {1, 2, 3} or for e in {1, 2, 3}. This affected embedders passing compiled or py_freeze! code to ctx.new_code, as examples/freeze and examples/mini_repl do.
Every caller already has a VirtualMachine, and PyVmBag already builds all constants. This PR routes code object construction through the VM:
API change: embedders replace vm.ctx.new_code(code) with vm.new_code(code).
Alternative to #8823, which builds frozensets without a VM.
Tests
🤖 Generated with Claude Code
Summary by CodeRabbit