Skip to content

feat: replace mirror.py with repo-release-tools rrt sync#175

Open
Anselmoo wants to merge 1 commit into
astral-sh:mainfrom
Anselmoo:fix/mirror-prek-rev
Open

feat: replace mirror.py with repo-release-tools rrt sync#175
Anselmoo wants to merge 1 commit into
astral-sh:mainfrom
Anselmoo:fix/mirror-prek-rev

Conversation

@Anselmoo

Copy link
Copy Markdown
Contributor

Summary

Replaces the bespoke mirror.py PEP 723 script with repo-release-tools v1.10.1's rrt sync command, which handles PyPI polling, config-driven file updates, commits, and tagging in a single call.

Responsibility Before After
PyPI polling mirror.py (urllib3, PEP 723 script) rrt sync (stdlib HTTP, zero extra deps)
File update patterns hardcoded regexes in Python config-driven version_targets + pin_targets
Version iteration hardcoded loop in Python built-in, ascending
Git commit hardcoded git commit in script --commit (template: Mirror: {version})
Git tag hardcoded git tag in script --tag (annotated, prefix v)
CI step uv run --no-project mirror.py rrt sync --bump --commit --tag

Dry-run output

✓ [DRY RUN] Mirror upstream ruff (pypi)
→ Current: 0.15.20

── Plan ──────────────────────────────────────────────────────
⊙ [dry-run] Would bump → 0.15.21 (files: pyproject.toml, README.md)
⊙ [dry-run] Would commit: "Mirror: 0.15.21"
⊙ [dry-run] Would tag: v0.15.21

⊙ [dry-run] complete – no changes made

All four patterns (pyproject.toml dep, YAML rev:, TOML rev = "v...", badge URL) are updated correctly.

Closes #174
Ref: #171

… sync

Upgrades the mirror pipeline to use `rrt sync --bump --commit --tag`,
which handles PyPI polling, file updates, commits, and tagging in a
single call — eliminating both mirror.py and versions.py entirely.

Adds [tool.rrt.upstream] config (package = "ruff", provider = "pypi")
so rrt can discover newer ruff releases autonomously.

Closes astral-sh#171 follow-up: the TOML rev pattern regression is also covered
by the rrt pin_targets config introduced in the previous commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 27, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: replace mirror.py + versions.py with repo-release-tools v1.10.1 rrt sync mirror.py does not update prek rev in README.md

2 participants