You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(tox): migrate from pip to uv via tox-uv (#6390)
## Description
* add `uv` and `tox-uv` to manage python envs and packages instead of
`pip`
* use `astral-sh/setup-uv` action in CI instead of `setup-python`,
top-level `uv` always uses `python3.14`
* except for 3.6 and 3.7, all python versions now go through `tox-uv`
* 3.6 and 3.7 have their own containers which `uv` picks up through
`UV_PYTHON_REFERENCE`
* the SDK is now installed as part of `deps` and not via `package` so
`uv` resolves all deps in a single pass, this was necessary since `uv`
resolution is stricter than `pip`
* `runtox.sh` also uses `uv run tox`
* some other pins were necessary to make CI pass
* pre-releases need a special `UV_PRERELEASE=ALL` for resolution to
work, we do not relax this throughout because `uv` then fetches
pre-releases for httpx and such breaking half the matrix
### Dev Flow Changes
No need for `asdf` or `pyenv` now if you were using it before, just use
`uv`, it will manage both `tox` and required python versions internally.
New commands:
- List tox envs: `uv run tox l`
- Integration tests: `uv run tox -e py3.14-{integration}-v{version}`
- Common tests: `uv run tox -e py3.14-common`
- Run specific test file:
`TESTPATH=tests/integrations/logging/test_logging.py uv run tox -e
py3.14-common`
- Run single test: `TESTPATH=tests/path/to/test_file.py uv run tox -e
py3.14-common -- -k "test_name"`
### TODO
* [ ] coverage (which is a mess anyway)
* [x] dev flow with `uv` as well - linters, top level tox, test file
generation all managed with `uv`
* [x] ruff: #6430
* [x] mypy: #6436
* [x] scripts/dist/apidocs/aws:
#6439
* [ ] dev flow docs (asdf) for python 3.6/3.7 since `uv` does not manage
those
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Neel Shah <neel.shah@sentry.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
-->
9
9
10
10
#### Reminders
11
-
- Please add tests to validate your changes, and lint your code using `tox -e linters`.
11
+
- Please add tests to validate your changes, and lint your code using `uv run ruff`.
12
12
- Add GH Issue ID _&_ Linear ID (if applicable)
13
13
- PR title should use [conventional commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`)
14
14
- For external contributors: [CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md), [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/Ww9hbqr)
0 commit comments