Context
Issue #171 identified that mirror.py missed the TOML-style rev = "v..." pattern in README.md due to hardcoded regexes.
PR #172 proposed replacing mirror.py with repo-release-tools v1.10.0, using:
versions.py — a thin PEP 723 script for PyPI polling
rrt bump … --no-commit in a CI shell loop for file updates + commits
This proposal
repo-release-tools v1.10.1 (released 2026-06-26) ships rrt sync, which makes versions.py and the shell loop entirely obsolete.
rrt sync --bump --commit --tag does everything in one call:
| Responsibility |
Before (mirror.py) |
After (rrt sync) |
| PyPI polling |
mirror.py — hardcoded urllib3 script |
built-in, 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 |
Proposed changes
pyproject.toml
Add an [tool.rrt.upstream] sub-table and bump the dev dependency:
[dependency-groups]
dev = [
"repo-release-tools>=1.10.1",
]
[tool.rrt]
release_branch = "main"
lock_command = []
[tool.rrt.upstream]
package = "ruff"
provider = "pypi"
commit_message = "Mirror: {version}"
[[tool.rrt.version_targets]]
path = "pyproject.toml"
kind = "pattern"
pattern = 'ruff==(\d+\.\d+\.\d+)'
[[tool.rrt.pin_targets]]
path = "README.md"
pattern = '(rev: v)(\d+\.\d+\.\d+)()'
[[tool.rrt.pin_targets]]
path = "README.md"
pattern = '(rev = "v)(\d+\.\d+\.\d+)(")'
[[tool.rrt.pin_targets]]
path = "README.md"
pattern = '(/ruff/)(\d+\.\d+\.\d+)(\.svg)'
.github/workflows/main.yml
Replace the 11-line shell loop with a single call:
# before
- name: Mirror new ruff versions
run: |
uv run --no-project mirror.py
# after
- name: Mirror new ruff versions
run: uvx "repo-release-tools==$RRT_VERSION" sync --bump --commit --tag
env:
RRT_VERSION: "1.10.1"
Delete mirror.py and versions.py
No longer needed — rrt sync handles PyPI polling, file updates, commits, and tagging internally.
Dry-run output
✓ [DRY RUN] Mirror upstream ruff (pypi)
→ Current: 0.15.18
── Plan ──────────────────────────────────────────────────────
⊙ [dry-run] Would bump → 0.15.19 (files: pyproject.toml, README.md)
⊙ [dry-run] Would commit: "Mirror: 0.15.19"
⊙ [dry-run] Would tag: v0.15.19
⊙ [dry-run] Would bump → 0.15.20 (files: pyproject.toml, README.md)
⊙ [dry-run] Would commit: "Mirror: 0.15.20"
⊙ [dry-run] Would tag: v0.15.20
⊙ [dry-run] complete – no changes made
All four patterns (pyproject.toml dep, YAML rev, TOML rev, badge URL) are updated correctly — including the TOML rev = "v..." pattern that caused #171.
Ref: #171, #172
Context
Issue #171 identified that
mirror.pymissed the TOML-stylerev = "v..."pattern inREADME.mddue to hardcoded regexes.PR #172 proposed replacing
mirror.pywithrepo-release-tools v1.10.0, using:versions.py— a thin PEP 723 script for PyPI pollingrrt bump … --no-commitin a CI shell loop for file updates + commitsThis proposal
repo-release-tools v1.10.1 (released 2026-06-26) ships
rrt sync, which makesversions.pyand the shell loop entirely obsolete.rrt sync --bump --commit --tagdoes everything in one call:mirror.py— hardcoded urllib3 scriptversion_targets+pin_targetsgit commitin script--commit(template:Mirror: {version})git tagin script--tag(annotated, prefixv)uv run --no-project mirror.pyrrt sync --bump --commit --tagProposed changes
pyproject.tomlAdd an
[tool.rrt.upstream]sub-table and bump the dev dependency:.github/workflows/main.ymlReplace the 11-line shell loop with a single call:
Delete
mirror.pyandversions.pyNo longer needed —
rrt synchandles PyPI polling, file updates, commits, and tagging internally.Dry-run output
All four patterns (pyproject.toml dep, YAML rev, TOML rev, badge URL) are updated correctly — including the TOML
rev = "v..."pattern that caused #171.Ref: #171, #172