Migrate from rye to uv (eMudhra CA response)

Merged
MI
1mo ago
+1979-610

Why

  • Astral has deprecated rye in favour of uv, and rye can no longer be installed in our environments.
  • The rye lockfiles pinned certifi==2025.4.26, which still ships the emSign ECC Root CA - G3. certifi 2026.10.19 removes that root as part of the eMudhra CA response.
  • The rest of the org already runs uv 0.13.4. That release bundles the updated Mozilla root store (GHSA-hq85-5cpj-mr62).

What changed

  • pyproject.toml: replaced [tool.rye] (managed = true, empty dev-dependencies) with [tool.uv] and required-version = ">=0.13.4". The hatchling build backend is unchanged.
  • uv.lock replaces requirements.lock and requirements-dev.lock, which were identical. Both rye lockfiles are deleted.
  • Makefile: check_rye is now check_uv, which enforces MIN_UV_VERSION=0.13.4 using the same pattern as MCP-Template. rye run / rye sync are now uv run / uv sync. The requirements target now runs uv export instead of copying the deleted lockfile.
  • CI (test_target_tests.yaml, vulture_dead_code.yaml): eifinger/setup-rye@v4 (version latest) is replaced by astral-sh/setup-uv@v7 pinned to 0.13.4 with caching, and rye sync is now uv sync.
  • README.md, tests/README.md and .cursorrules now give uv install and usage instructions.

Dependency versions

The lock was resolved using the old pins as constraints, then re-locked without them, so every previously pinned version is kept. The only intended change is certifi.

PackageOldNew
certifi2025.4.262026.10.19
colorama(not locked)0.4.6, win32 only
win32-setctime(not locked)1.2.0, win32 only
greenlet(not locked)3.5.6, platform-marker dep of sqlalchemy

The three new entries appear because uv.lock is universal and rye's lock was platform-specific. They are not upgrades.

Verification

  • uv sync and uv lock --check pass, and certifi.__version__ reports 2026.10.19.
  • make test passes (1 passed) with dummy values for the env vars CI supplies through secrets. The same result occurs on the old rye-pinned versions in a throwaway venv.
  • make vulture is clean.
  • black --check reports no changes.
  • make requirements produces a requirements.txt with certifi==2026.10.19.
  • make check_uv passes with uv 0.13.4 and fails with a clear message when a stub reports uv 0.9.2.
  • grep -rni rye returns nothing.

Not verified / known issues

  • The CI workflows were not run locally. They will run on this PR.
  • make fmt prints find: expected an expression between '-o' and ')' from its JSON-formatting step. This bug exists before this PR: the IGNORE_LINT_DIRS pattern expansion is malformed. It was unreachable before because rye was not installed. It is out of scope here and left unchanged.

Generated by Claude Code


Summary by cubic

Migrates the project from rye to uv so the lockfile resolves to certifi 2026.10.19, which drops the compromised emSign ECC Root CA - G3. The rye lockfiles pinned certifi==2025.4.26, and uv 0.13.4 is required because it bundles the updated Mozilla root store (GHSA-hq85-5cpj-mr62).

  • Replaces [tool.rye] with [tool.uv] (required-version = ">=0.13.4"); uv.lock replaces both identical rye lockfiles, and make requirements now uses uv export.
  • Makefile and CI switch rye run/rye sync to uv run/uv sync; check_rye becomes check_uv enforcing uv ≥ 0.13.4, and CI uses astral-sh/setup-uv@v7 pinned to 0.13.4 with caching.
  • CI drops setup-python and lets uv provision the interpreter from .python-version, then runs uv sync --locked to verify the committed lockfile.
  • README, tests/README, and .cursorrules now document uv.

Dependencies

  • All previously pinned versions are kept; the only intended change is certifi 2025.4.26 → 2026.10.19.
  • colorama, win32-setctime, and greenlet appear in uv.lock because it is universal, not because they were added.