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 — [update_lib] Apply test grouping to deps by youknowone · Pull Request #6867 · RustPython/RustPython

Conversation

@youknowone

@youknowone youknowone commented Jan 24, 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

Release Notes

  • New Features

    • Enhanced dependency tracking with explicit hard dependency resolution and mapping of tests to library modules.
    • Support for processing multiple test paths in library updates.
  • Improvements

    • Improved file encoding handling with consistent UTF-8 encoding across all file operations.
    • More accurate dependency status reporting and visibility.

✏️ 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
@coderabbitai

coderabbitai Bot commented Jan 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The PR refactors dependency resolution APIs to require explicit cpython_prefix and lib_prefix arguments instead of defaults, expands the DEPENDENCIES table with new module groups and test mappings, enhances hard-dependency tracking and resolution with auto-detection of _py module variants, adds multi-test-path support to the quick workflow, and introduces explicit UTF-8 encoding for file I/O operations.

Changes

Cohort / File(s) Summary
Dependency Resolution Core
scripts/update_lib/deps.py
Refactored all public/private function signatures to require explicit cpython_prefix and lib_prefix arguments (removed defaults). Enhanced resolve_hard_dep_parent() to auto-detect _py{module}.py and _py_{module}.py patterns and strip .py extensions. Expanded DEPENDENCIES with new module groups (__future__, site, opcode, pickle, re, weakref, etc.) and normalized test path entries by removing redundant "test/" prefixes. Added new public functions: resolve_test_to_lib() and get_all_hard_deps(). Updated all internal call sites to pass explicit prefixes.
File I/O Encoding
scripts/update_lib/migrate.py
Added explicit UTF-8 encoding to all file read and write operations (read_text(encoding="utf-8") and write_text(..., encoding="utf-8")) across patching, copying, and content extraction flows. No signature or control flow changes.
Multi-Test Path Support
scripts/update_lib/quick.py
Modified git_commit() signature to accept multiple test paths (single Path, list, or None) and normalized to list for staging. Updated main() to collect and process all test paths via get_test_paths() with fallback logic, iterating over each for the commit. Expanded _expand_shortcut() to include extension-module test shortcut (test/test_<name>).
Dependency Display & Resolution
scripts/update_lib/show_deps.py
Removed default parameters from get_all_modules(), format_deps(), show_deps(), and related functions. Added hard_deps parameter to format_deps_tree() to display hard dependencies. Integrated resolve_test_to_lib() import and logic to resolve test-prefixed modules to library groups. Updated hard_deps collection to include explicit hard_deps and implicit ones derived from lib_paths.
Todo List & Tracking
scripts/update_lib/show_todo.py
Removed default parameters from all public functions (compute_todo_list(), get_all_tests(), get_untracked_files(), etc.) requiring explicit cpython_prefix and lib_prefix. Added hard_deps tracking via get_all_hard_deps() and status checks via is_up_to_date(). Introduced new get_original_files() helper. Enhanced output formatting to display hard_deps status information (all deps in verbose mode; only outdated in normal mode).
Test Updates
scripts/update_lib/tests/test_deps.py
Updated test assertions in test_auto_detect_py_module to use new module naming scheme (mymodule/_pymymodule instead of datetime/_pydatetime) and verify auto-detection of both .py and _py{module}.py patterns.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • RustPython/RustPython#6847 — Modifies overlapping dependency resolution codepaths (resolve_hard_dep_parent, test-module resolution) in deps.py and show_deps.py
  • RustPython/RustPython#6823 — Updates the same files (deps.py, show_todo.py) with cascading function signature changes and hard_deps tracking
  • RustPython/RustPython#6817 — Implements hard-dependency resolution and get_lib_paths auto-detection of _py module variants in deps.py

Suggested reviewers

  • moreal
  • ShaharNaveh

Poem

🐰 Hoppity-hop, no defaults stay!
Explicit paths light the way,
Hard deps now dance, tests align,
UTF-8 codes all sign,
Multi-path streams gently flow—
The updates bloom, watch them grow! 🌱✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Apply test grouping to deps' directly describes the main change: integrating test grouping into the dependency tracking system. It accurately reflects the PR's comprehensive refactoring of test resolution and dependency handling in deps.py.
Docstring Coverage ✅ Passed Docstring coverage is 95.24% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

@youknowone youknowone added the skip:ci Skip running the ci label Jan 24, 2026
@youknowone
youknowone marked this pull request as ready for review January 24, 2026 15:16
@youknowone
youknowone enabled auto-merge (squash) January 24, 2026 15:16
@github-actions

github-actions Bot commented Jan 24, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Code has been automatically formatted

The code in this PR has been formatted using:

  • ruff format
    Please pull the latest changes before pushing again:
git pull origin update_lib-deps
All reactions

Sorry, something went wrong.

Uh oh!

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

youknowone added 7 commits January 25, 2026 01:14
@youknowone
quick resolve test path too
d18e8ce
@youknowone
Fix migrate resolve
7cfcb08
@youknowone
Remove test/ from deps data
58a7e75
@youknowone
resolve test to lib
af3b64c
@youknowone
report original files
2398eb6
@youknowone
no default
2922862
@youknowone
show hard deps on todo/deps
32edb42
@youknowone
youknowone force-pushed the update_lib-deps branch from abf2c4c to 32edb42 Compare January 24, 2026 16:15
@github-actions
Auto-format: ruff format
15950f1
@youknowone
youknowone requested review from ShaharNaveh and moreal January 24, 2026 16:18
ShaharNaveh
ShaharNaveh approved these changes Jan 24, 2026
View reviewed changes

@ShaharNaveh ShaharNaveh left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Sorry, something went wrong.

Uh oh!

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

All reactions
@youknowone
youknowone merged commit 9071147 into RustPython:main Jan 24, 2026
9 checks passed

Uh oh!

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

@youknowone
youknowone deleted the update_lib-deps branch January 24, 2026 16:40
@coderabbitai coderabbitai Bot mentioned this pull request Jan 26, 2026
Improve deps output #6874
Merged
This was referenced Feb 25, 2026
update_lib test format fix + deps for atexit & eintr #7227
Merged
Reapply "ast.NodeVisitor for import tracking" #7241
Merged
[update_lib] fast date lookup for todo #7299
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ShaharNaveh ShaharNaveh ShaharNaveh approved these changes
@moreal moreal Awaiting requested review from moreal

Uh oh!

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

Assignees

No one assigned

Labels

skip:ci Skip running the ci

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.

2 participants

@youknowone @ShaharNaveh
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.