◐ Shell
reader mode source ↗
Skip to content

Introduce /upgrade-pylib-next#6827

Merged
youknowone merged 9 commits into
RustPython:mainfrom
moreal:upgrade-pylib-next
Jan 30, 2026
Merged

Introduce /upgrade-pylib-next#6827
youknowone merged 9 commits into
RustPython:mainfrom
moreal:upgrade-pylib-next

Conversation

@moreal

@moreal moreal commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces /upgrade-pylib-next command to find a module to update by running scripts/update_lib todo (#6823). It just finds a module to update and delegates other to /upgrade-pylib. (cc #6580)

This pull request also has changes about /upgrade-pylib. It became to use auto-mark subcommand to test newly introduced tests also.

Summary by CodeRabbit

  • Chores
    • Added structured guidance document for investigating test failures with step-by-step analysis and issue reporting workflow.
    • Added workflow document for selecting and upgrading Python library modules based on dependency status.
    • Updated Python library upgrade process with streamlined steps, enhanced test-management guidance, and improved examples.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Three new Claude command documents added to guide test failure investigation and Python library upgrades. The first provides structured debugging procedures for failing tests. The second automates selection of next upgrade candidates. The third substantially restructures the upgrade workflow with expanded guidance for test management and git workflows.

Changes

Cohort / File(s) Summary
New Test Failure Investigation
.claude/commands/investigate-test-failure.md
New guidance document establishing structured tool-assisted process for diagnosing failing tests, including mandatory analysis steps, fix categorization (simple vs. complex), pre-commit workflow commands, and issue template generation.
New Upgrade Workflow Automation
.claude/commands/upgrade-pylib-next.md
New workflow document that codifies module selection criteria for Python library upgrades, including status checks via task listing, open PR filtering, dependency-aware prioritization, and recommended invocation command.
Restructured Upgrade Process
.claude/commands/upgrade-pylib.md
Substantial reorganization of upgrade documentation replacing four-stage flow with expanded seven-step sequence, introducing tool-assisted test failure investigation, explicit git-commit creation, subagent-guided workflows, auto-marking of failures, panic handling, and enriched examples for both module-name and library-path invocations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • Update AI docs #6728 — Directly modified .claude/commands/upgrade-pylib.md which this PR substantially reorganizes and expands with new workflow structure.
  • Complement upgrade-pylib Claude Code command #6742 — Updated the upgrade-pylib documentation and test-upgrade behavior, overlapping with this PR's enhancements to test-failure workflow and guidance.

Suggested reviewers

  • youknowone
  • ShaharNaveh

Poem

🐰 With tools and steps, we chart our way,
Testing failures fade to gray,
Upgrades flow in ordered grace,
Automation sets the pace—
A rabbit's gift, docs bright and clear!

🚥 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 'Introduce /upgrade-pylib-next' directly and specifically describes the main change: a new command being added to the system.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ 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.

@moreal moreal force-pushed the upgrade-pylib-next branch from cb9edb5 to eb416e9 Compare January 21, 2026 09:47
@youknowone youknowone added the skip:ci Skip running the ci label Jan 21, 2026
@moreal moreal force-pushed the upgrade-pylib-next branch 2 times, most recently from 273678f to fc57173 Compare January 22, 2026 05:39
@moreal moreal force-pushed the upgrade-pylib-next branch from fc57173 to 50abeca Compare January 23, 2026 13:20
youknowone pushed a commit that referenced this pull request Jan 23, 2026
This pull request updates `types` module to v3.14.2. While doing it, it
fixes also async-related feature. This pull request's base is generated
by #6827.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Generators that act as iterable coroutines are now recognized as
awaitable, improving async behavior.
* Yield-from and await interactions now handle coroutine-iterable
sources more consistently.

* **Bug Fixes**
* Reduces spurious TypeError cases when awaiting or yielding from
wrapped coroutine-like generators.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@moreal moreal force-pushed the upgrade-pylib-next branch 3 times, most recently from 23e2a99 to d24423b Compare January 23, 2026 15:40
@moreal moreal force-pushed the upgrade-pylib-next branch from d24423b to 2783211 Compare January 30, 2026 21:53
@moreal moreal self-assigned this Jan 30, 2026
@moreal moreal force-pushed the upgrade-pylib-next branch from 2783211 to 01c614d Compare January 30, 2026 22:32
@moreal moreal marked this pull request as ready for review January 30, 2026 22:35
@moreal

moreal commented Jan 30, 2026

Copy link
Copy Markdown
Contributor Author

Can we merge this pull request? I haven't been able to do much dogfooding these past few days, but I still find it useful. cc #6833

@moreal moreal requested a review from youknowone January 30, 2026 22:37

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hide comment

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.claude/commands/upgrade-pylib.md:
- Around line 110-120: Update the fenced "Example Usage" code block to include a
language identifier so syntax highlighting is applied; specifically add "bash"
after the opening triple backticks for the block that contains the
/upgrade-pylib usage examples (lines showing "/upgrade-pylib inspect",
"/upgrade-pylib json", "/upgrade-pylib asyncio" and the path examples) so the
block begins with ```bash instead of ```; no other changes to the content are
needed.
- Around line 51-71: Step 3's markdown code blocks lack language identifiers;
update the code fences around the shell commands in the “Investigate test
failures with subagent” section to use ```bash (or ```sh) for the three examples
containing the commands `cargo run --release -- scripts/update_lib deps
$ARGUMENTS`, `cargo run --release -- -m test test_xxx test_yyy ... 2>&1 | grep
-E "^(FAIL|ERROR):"`, and the example `cargo run --release -- -m test test_bdb
test_inspect test_linecache test_traceback test_zipimport 2>&1 | grep -E
"^(FAIL|ERROR):"` so they render with proper syntax highlighting.
- Around line 1-3: The allowed-tools header currently permits only Bash(git
add:*), Bash(git commit:*), Bash(python3 scripts/update_lib quick:*), and
Bash(python3 scripts/update_lib auto-mark:*), but the workflow runs cargo run
--release -- scripts/update_lib deps; update the allowed-tools header to also
include Bash(python3 scripts/update_lib deps:*) (or the equivalent pattern used
for quick/auto-mark) so the `deps` subcommand is allowed; ensure the new entry
matches the existing pattern for `quick` and `auto-mark` to permit the deps
invocation and related test commands.

Hide details View details @youknowone youknowone merged commit 0c17462 into RustPython:main Jan 30, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip:ci Skip running the ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants