Repository navigation
Merge PyInner into Py - #8820
Conversation
Rename the object layout struct `PyInner<T>` to `Py<T>` and make it the public type, replacing the `#[repr(transparent)]` newtype `Py<T>(PyInner<T>)`. Header fields stay `pub(super)`. `PyObject` now wraps `Py<Erased>`. - Drop the `.0` hop on `Py<T>` accesses. - Remove the delegating `Traverse for Py<T>` impl; the former `Traverse for PyInner<T>` impl now serves `Py<T>`. - Remove `Debug for PyInner<T>`; `debug_obj` writes the `[PyObject ...]` form itself. - Use `Py::from_payload_ptr` in `PyWeak::drop_inner` and drop its now-stale `allow(dead_code)`. Assisted-by: Claude Code:claude-opus-5-5
|
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: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe object header and payload now reside directly in ChangesPy object representation
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is identified; this change is ready for normal validation. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The object-layout change affects a central VM component, but the reviewed paths preserve the existing ownership and lifecycle controls. No introduced security failure was established; some downstream and runtime coverage remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 59.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 5 files. (1 skipped: 1 too large.) ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Py<T>was a#[repr(transparent)]newtype over the privatePyInner<T>, which held the object header and payload. This renamesPyInner<T>toPy<T>and makes it the public type, so there is one struct for the object layout.ref_count,vtable,gc_*,typ,payload) staypub(super), so nothing new is exposed outsideobject.PyObjectis nowPyObject(Py<Erased>).Py<T>accesses drop the.0hop.Traverse for Py<T>impl is gone; the formerTraverse for PyInner<T>impl now servesPy<T>.Debug for PyInner<T>is gone;debug_objwrites the same[PyObject ...]output itself.PyWeak::drop_innerusesPy::from_payload_ptrinstead of recomputing the payload offset.No layout or behavior change intended.
🤖 Generated with Claude Code
Summary by CodeRabbit