chore: Move script running to uv#6439
Conversation
Codecov Results 📊✅ 67 passed | Total: 67 | Pass Rate: 100% | Execution Time: 7.68s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 14837 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 35.12% 35.14% +0.02%
==========================================
Files 190 190 —
Lines 22901 22877 -24
Branches 7854 7834 -20
==========================================
+ Hits 8044 8040 -4
- Misses 14857 14837 -20
- Partials 714 713 -1Generated by Codecov Action |
fafa7d0 to
fbb37f3
Compare
| # https://github.com/boto/botocore/blob/develop/setup.cfg | ||
| # So we pin this here to make our Lambda layer work with | ||
| # Lambda Function using Python 3.7+ | ||
| "urllib3<1.27; python_version < '3.10'", |
There was a problem hiding this comment.
fwiw, we are never creating the lambda layer with older pythons anymore, so this will never fire. I'm not even sure how our layers work right now.
fbb37f3 to
1034f77
Compare
There was a problem hiding this comment.
🚀
What I'm missing is some kind of docs on the new way of doing the usual stuff we do (run a specific tox target, lint, run mypy). Would be good to have that documented somewhere. In a similar vein, CONTRIBUTING.md (and maybe other places?) likely needs an update now so that contributors also know how to these things
|
will consolidate in main branch |
1034f77 to
f477d80
Compare
* Invoke `find_raise_from_none` with uv * Remove `linters` from `tox` completely * Remove unused `ready_yet` * Invoke `populate_tox` and `split_tox_gh_actions` with uv * Move `apidocs` to uv * Move from `make build` to `uv build` (verification of contents below) * Move from `make aws-lambda-layer` to uv * Remove `Makefile` completely * Remove unused `dist-serverless` from github workflows ⏺ Sdist contents identical too — the 9-byte difference is just tarball/gzip metadata (timestamps, header). Final summary: Artifact: Wheel filename make dist: sentry_sdk-2.61.0-py3-none-any.whl uv build: same Diff: ✓ ──────────────────────────────────────── Artifact: Wheel bytes make dist: 483,104 uv build: 483,104 Diff: ✓ identical ──────────────────────────────────────── Artifact: Wheel contents make dist: — uv build: — Diff: ✓ identical (recursive diff clean) ──────────────────────────────────────── Artifact: Sdist filename make dist: sentry_sdk-2.61.0.tar.gz uv build: same Diff: ✓ ──────────────────────────────────────── Artifact: Sdist file list make dist: — uv build: — Diff: ✓ identical ──────────────────────────────────────── Artifact: Sdist contents make dist: — uv build: — Diff: ✓ identical (recursive diff clean) ──────────────────────────────────────── Artifact: Sdist bytes make dist: 459,825 uv build: 459,834 Diff: tarball metadata only (9 bytes)
f477d80 to
7e9fda4
Compare
f469ce3
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>
Description
find_raise_from_nonewith uvlintersfromtoxcompletelyready_yetpopulate_toxandsplit_tox_gh_actionswith uvapidocsto uvmake buildtouv build(verification of contents below)make aws-lambda-layerto uvMakefilecompletelydist-serverlessfrom github workflowsContent verification of
make dist->uv build