GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gc is vm/stdlib by youknowone · Pull Request #6929 · RustPython/RustPython

Conversation

@youknowone

@youknowone youknowone commented Feb 1, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

All reactions
@youknowone
gc is vm/stdlib
6c4beb0
@coderabbitai

coderabbitai Bot commented Feb 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • gc module internal structure and API #6910: Modifies VM gc integration and gc stdlib registration—closely related to the gc module registration changes here.
  • impl gc finialized #6689: Adds/adjusts gc_finalized API and GC bit mechanics that intersect with the visibility change to gc_finalized.

Suggested reviewers

  • ShaharNaveh

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 docstrings
🧪 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions
Auto-format: cargo fmt --all
1b6548d
@github-actions

github-actions Bot commented Feb 1, 2026

Copy link
Copy Markdown
Contributor

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowone
youknowone marked this pull request as ready for review February 1, 2026 04:21
@youknowone
Merge branch 'main' into gc-location
5c35499
@youknowone
youknowone merged commit 5e4c3b0 into RustPython:main Feb 1, 2026
12 of 13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@youknowone
youknowone deleted the gc-location branch February 1, 2026 04:21
This was referenced Feb 26, 2026
Update tarfile from v3.14.3 and fix bugs #7223
Merged
Replace GC tracking HashSet with intrusive linked list #7328
Merged
@coderabbitai coderabbitai Bot mentioned this pull request Mar 12, 2026
If the host_env feature is enabled, then enable the _ctypes module on the Android platform. #7402
Merged
@coderabbitai coderabbitai Bot mentioned this pull request Jul 8, 2026
Add garbage collection c-api #8239
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

1 participant

@youknowone
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.