chore: Move mypy to uv#6436
Conversation
Codecov Results 📊❌ 13 failed | Total: 13 | Pass Rate: 0% | Execution Time: 6.82s ❌ Failed Tests
|
5f0edc9 to
16d3d77
Compare
ad243c4 to
07280c2
Compare
16d3d77 to
a06be42
Compare
a06be42 to
5e18c7c
Compare
|
test failure is due to new redis 8 release for rq, will fix separately, ignore here |
81acec3
into
chore/migrate-to-tox-uv
## 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>
keeping this in a separate dependency group since we install lots of random packages just for typing