Skip to content

chore: Move script running to uv#6439

Merged
sl0thentr0py merged 1 commit into
chore/migrate-to-tox-uvfrom
neel/uv/scripts
May 29, 2026
Merged

chore: Move script running to uv#6439
sl0thentr0py merged 1 commit into
chore/migrate-to-tox-uvfrom
neel/uv/scripts

Conversation

@sl0thentr0py
Copy link
Copy Markdown
Member

@sl0thentr0py sl0thentr0py commented May 28, 2026

Description

  • 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

Content verification of make dist -> uv build

⏺ 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)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Codecov Results 📊

67 passed | Total: 67 | Pass Rate: 100% | Execution Time: 7.68s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 14837 uncovered lines.
✅ Project coverage is 35.14%. Comparing base (base) to head (head).

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        -1

Generated by Codecov Action

Comment thread pyproject.toml
# 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'",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sl0thentr0py sl0thentr0py marked this pull request as ready for review May 28, 2026 17:44
@sl0thentr0py sl0thentr0py requested a review from a team as a code owner May 28, 2026 17:44
Comment thread .github/workflows/ci.yml
Comment thread scripts/build_aws_lambda_layer.py
Copy link
Copy Markdown
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

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

@sl0thentr0py
Copy link
Copy Markdown
Member Author

will consolidate in main branch

Base automatically changed from neel/uv/mypy to chore/migrate-to-tox-uv May 29, 2026 10:49
* 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)
@sl0thentr0py sl0thentr0py merged commit f469ce3 into chore/migrate-to-tox-uv May 29, 2026
143 of 151 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/uv/scripts branch May 29, 2026 11:10
sl0thentr0py added a commit that referenced this pull request May 29, 2026
## 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>
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.

3 participants