Skip to content

ref: Remove pip, use uv everywhere - #243

Merged
joshuarli merged 3 commits into
mainfrom
ref/remove-pip-use-uv
Oct 17, 2026
Merged

joshuarli merged 3 commits into
mainfrom
ref/remove-pip-use-uv

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

devenv no longer uses pip anywhere; uv does it all.

  • install-devenv.sh creates the global venv with uv venv and installs devenv with uv pip. It looks for an existing uv (including brew and ~/.local/bin) even though it resets PATH, and installs the latest uv with astral's installer if it can't find one. The global venv no longer has pip in it.
  • devenv update upgrades the global devenv with uv pip install --upgrade.
  • devenv.lib.venv keeps the same API, since ops, sentry-infra-tools, sentry-protos and others still call venv.get/ensure/sync. Under the hood it now uses uv venv and uv pip install. Those venvs won't have pip in them anymore, and pip config such as pip.conf / PIP_* is no longer read.
  • New uv.find() returns the uv on PATH, falls back to ~/.local/bin/uv, and otherwise exits with install instructions.
  • CI: build.yml runs uv build instead of setup-python + pip install build. Every workflow is on setup-uv v10.3.0 with the latest uv (the 0.12.10 pin is gone), and integration.yml sets up uv itself.

I also ran uv lock --upgrade to clear the known vulnerabilities in the lockfile: urllib3 2.6.3→2.8.0, virtualenv 21.1.0→21.14.8, pygments 2.19.2→2.21.0, pytest 9.0.2→9.1.1. uv audit now reports none. This also bumps dev tools (mypy 1→2, ruff 0.15→0.17); lint passes with them.

via @joshuarli.

--

View Junior Session [Sentry]

devenv now uses uv for everything that used pip:

- install-devenv.sh creates the global venv with uv venv and installs
  devenv with uv pip, installing the latest uv if none is found
- devenv update upgrades the global devenv with uv pip
- devenv.lib.venv creates venvs with uv venv and installs requirements
  with uv pip, keeping the same API for repos that still use it
- the build workflow uses uv build instead of pip install build

Also upgrade uv.lock to clear known vulnerabilities (urllib3, virtualenv,
pygments, pytest) and use the latest uv and setup-uv in CI.

Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
mypy 2 crashes with an INTERNAL ERROR when pre-commit's parallel mypy
processes race on the shared .mypy_cache.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7d50347. Configure here.

Comment thread devenv/lib/venv.py
check() matched any key starting with "version" and compared the whole
value, so a venv whose pyvenv.cfg says version_info = 3.11.6.final.0
was always seen as mismatched and recreated on every ensure().
@joshuarli
joshuarli merged commit b007399 into main Oct 17, 2026
17 checks passed
@joshuarli
joshuarli deleted the ref/remove-pip-use-uv branch October 17, 2026 01:50
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.

1 participant