GeezerVison is showing github.com — gc is vm/stdlib by youknowone · Pull Request #6929 · RustPython/RustPython
Conversation
youknowone
commented
Feb 1, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary by CodeRabbit
-
New Features
- Added bz2 and compression modules to the standard library, expanding data compression capabilities.
-
Chores
- Refactored internal module organization for improved code structure and maintainability. Updated visibility policies to align with architectural best practices.
✏️ Tip: You can customize this high-level summary in your review settings.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Feb 1, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Caution
Review failed
The pull request is closed.
📝 Walkthrough
Walkthrough
Adds internal bz2 and compression modules to stdlib, removes gc from that stdlib declaration, registers a private gc module in crates/vm/src/stdlib, and narrows PyObject::gc_finalized visibility to crate-only; also updates import paths in the gc stdlib file.
Changes
| Cohort / File(s) |
Summary |
Stdlib core modules crates/stdlib/src/lib.rs |
Adds mod bz2; and mod compression; (compression marked internal); removes previous gc declaration from this file and adds bz2::module_def(ctx) and compression::module_def(ctx) to stdlib_module_defs. |
VM stdlib registration crates/vm/src/stdlib/mod.rs |
Adds private mod gc; and registers gc::module_def(ctx) in builtin_module_defs. |
GC implementation changes crates/vm/src/stdlib/gc.rs |
Updates imports to use direct crate-root types (PyObjectRef, PyResult, VirtualMachine, builtins::PyListRef, function::{FuncArgs, OptionalArg}) and removes a comment in is_finalized (function now directly returns obj.gc_finalized()). |
API visibility crates/vm/src/object/core.rs |
Changes PyObject::gc_finalized visibility from pub fn to pub(crate) fn, restricting access to the crate. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
🐰 I hopped through modules, tidy and spry,
Added bz2, compression — gave gc a new sky.
A quieter finale, visibility small,
The rabbit applauds changes, big and small. 🥕✨
✨ Finishing touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
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.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Code has been automatically formatted
The code in this PR has been formatted using:
cargo fmt --all
Please pull the latest changes before pushing again:
git pull origin gc-location
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Feb 26, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|