Improve object traversal for heap types and mro#6976
Conversation
- Fix heap type instance traversal to include type reference (enables correct cycle detection for instance ↔ type references) - Enable mro traversal in PyType (was previously disabled)
📝 WalkthroughWalkthroughThis PR enhances garbage collection tracing in the RustPython VM by re-enabling MRO traversal in PyType and adding explicit heap-type reference tracing in PyInner object traversal. These changes ensure complete marking of type relationships during GC cycles. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Sorry, something went wrong.
d6aab01
into
RustPython:main
Feb 3, 2026
Summary by CodeRabbit