Skip to content

Commit 5ede646

Browse files
committed
Merge branch 'main' into gen-env
# Conflicts: # crates/uv-static/src/env_vars.rs # docs/configuration/environment.md
2 parents 46b3d68 + bf8436c commit 5ede646

File tree

204 files changed

+14803
-6785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+14803
-6785
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -108,37 +108,30 @@ jobs:
108108
- name: "Clippy"
109109
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
110110

111-
cargo-clippy-xwin:
112-
# Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
113-
timeout-minutes: 20
111+
cargo-clippy-windows:
112+
timeout-minutes: 15
114113
needs: determine_changes
115114
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
116-
runs-on: ubuntu-latest
115+
runs-on:
116+
labels: "windows-latest-xlarge"
117117
name: "cargo clippy | windows"
118118
steps:
119119
- uses: actions/checkout@v4
120-
- name: Load xwin cache
121-
uses: actions/cache@v4
122-
with:
123-
path: "${{ github.workspace}}/.xwin"
124-
key: cargo-xwin-x86_64
125-
- name: Load rust cache
126-
uses: Swatinem/rust-cache@v2
127-
with:
128-
save-if: ${{ github.ref == 'refs/heads/main' }}
120+
- uses: Swatinem/rust-cache@v2
121+
122+
- name: Create Dev Drive using ReFS
123+
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
124+
125+
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
126+
- name: Copy Git Repo to Dev Drive
127+
run: |
128+
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse
129+
129130
- name: "Install Rust toolchain"
130-
run: rustup target add x86_64-pc-windows-msvc
131-
- name: "Install cargo-xwin"
132-
uses: taiki-e/install-action@v2
133-
with:
134-
tool: cargo-xwin
135-
- name: Install xwin dependencies
136-
run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
131+
run: rustup component add clippy
132+
137133
- name: "Clippy"
138-
run: cargo xwin clippy --target x86_64-pc-windows-msvc --workspace --all-targets --all-features --locked --profile fast-build -- -D warnings
139-
env:
140-
XWIN_ARCH: "x86_64"
141-
XWIN_CACHE_DIR: "${{ github.workspace}}/.xwin"
134+
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
142135

143136
cargo-dev-generate-all:
144137
timeout-minutes: 10
@@ -303,7 +296,7 @@ jobs:
303296
# See https://github.com/astral-sh/uv/issues/6940
304297
UV_LINK_MODE: copy
305298
run: |
306-
cargo nextest run --no-default-features --features python,pypi --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow
299+
cargo nextest run --no-default-features --features python,pypi,python-managed --workspace --status-level skip --failure-output immediate-final --no-fail-fast -j 20 --final-status-level slow
307300
308301
- name: "Smoke test"
309302
working-directory: ${{ env.UV_WORKSPACE }}
@@ -329,11 +322,10 @@ jobs:
329322
330323
# Separate jobs for the nightly crate
331324
windows-trampoline-check:
332-
# Do not set timeout below 15 minutes as uncached xwin Windows SDK download can take 10+ minutes
333-
timeout-minutes: 20
325+
timeout-minutes: 15
334326
needs: determine_changes
335327
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
336-
runs-on: ubuntu-latest
328+
runs-on: windows-latest-xlarge
337329
name: "check windows trampoline | ${{ matrix.target-arch }}"
338330
strategy:
339331
fail-fast: false
@@ -342,50 +334,45 @@ jobs:
342334
steps:
343335
- uses: actions/checkout@v4
344336

345-
- name: Load xwin cache
346-
uses: actions/cache@v4
347-
with:
348-
path: "${{ github.workspace }}/.xwin"
349-
key: cargo-xwin-${{ matrix.target-arch }}
337+
- name: Create Dev Drive using ReFS
338+
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
350339

351-
- uses: rui314/setup-mold@v1
340+
# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
341+
- name: Copy Git Repo to Dev Drive
342+
run: |
343+
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse
352344
353345
- uses: Swatinem/rust-cache@v2
354346
with:
355-
workspaces: ${{ github.workspace }}/crates/uv-trampoline
347+
workspaces: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
356348

357349
- name: "Install Rust toolchain"
358-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
350+
working-directory: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
359351
run: |
360352
rustup target add ${{ matrix.target-arch }}-pc-windows-msvc
361353
rustup component add rust-src --target ${{ matrix.target-arch }}-pc-windows-msvc
362354
363-
- name: "Install cargo-xwin and cargo-bloat"
355+
- name: "Install cargo-bloat"
364356
uses: taiki-e/install-action@v2
365357
with:
366-
tool: cargo-xwin,cargo-bloat
367-
368-
- name: "Install xwin dependencies"
369-
run: sudo apt-get install --no-install-recommends -y lld llvm clang cmake ninja-build
358+
tool: cargo-bloat
370359

371360
- name: "Clippy"
372-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
373-
if: matrix.target-arch == 'x86_64'
374-
run: cargo xwin clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
375-
env:
376-
XWIN_ARCH: "x86_64"
377-
XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
361+
working-directory: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
362+
run: cargo clippy --all-features --locked --target x86_64-pc-windows-msvc --tests -- -D warnings
378363

379364
- name: "Bloat Check"
380-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
381-
if: matrix.target-arch == 'x86_64'
365+
working-directory: ${{ env.UV_WORKSPACE }}/crates/uv-trampoline
382366
run: |
383-
cargo xwin bloat --release --target x86_64-pc-windows-msvc | \
384-
grep -v -i -E 'core::fmt::write|core::fmt::getcount' | \
385-
grep -q -E 'core::fmt|std::panicking|std::backtrace_rs' && exit 1 || exit 0
386-
env:
387-
XWIN_ARCH: "x86_64"
388-
XWIN_CACHE_DIR: "${{ github.workspace }}/.xwin"
367+
$output = cargo bloat --release --target x86_64-pc-windows-msvc
368+
$filteredOutput = $output | Select-String -Pattern 'core::fmt::write|core::fmt::getcount' -NotMatch
369+
$containsPatterns = $filteredOutput | Select-String -Pattern 'core::fmt|std::panicking|std::backtrace_rs'
370+
371+
if ($containsPatterns) {
372+
Exit 1
373+
} else {
374+
Exit 0
375+
}
389376
390377
# Separate jobs for the nightly crate
391378
windows-trampoline-test:
@@ -397,6 +384,7 @@ jobs:
397384
strategy:
398385
fail-fast: false
399386
matrix:
387+
# Note, we exclude `aarch64` because it's not supported by the GitHub runner
400388
target-arch: ["x86_64", "i686"]
401389
steps:
402390
- uses: actions/checkout@v4
@@ -408,16 +396,23 @@ jobs:
408396
- uses: Swatinem/rust-cache@v2
409397
with:
410398
workspaces: ${{ github.workspace }}/crates/uv-trampoline
399+
- name: "Test committed binaries"
400+
working-directory: ${{ github.workspace }}
401+
run: |
402+
rustup target add ${{ matrix.target-arch }}-pc-windows-msvc
403+
cargo test -p uv-trampoline-builder --target ${{ matrix.target-arch }}-pc-windows-msvc
411404
# Build and copy the new binaries
412405
- name: "Build"
413406
working-directory: ${{ github.workspace }}/crates/uv-trampoline
414407
run: |
415408
cargo build --target ${{ matrix.target-arch }}-pc-windows-msvc
416409
cp target/${{ matrix.target-arch }}-pc-windows-msvc/debug/uv-trampoline-console.exe trampolines/uv-trampoline-${{ matrix.target-arch }}-console.exe
417410
cp target/${{ matrix.target-arch }}-pc-windows-msvc/debug/uv-trampoline-gui.exe trampolines/uv-trampoline-${{ matrix.target-arch }}-gui.exe
418-
- name: "Test"
419-
working-directory: ${{ github.workspace }}/crates/uv-trampoline
420-
run: cargo test --target ${{ matrix.target-arch }}-pc-windows-msvc --test *
411+
- name: "Test new binaries"
412+
working-directory: ${{ github.workspace }}
413+
run: |
414+
# We turn off the default "production" test feature since these are debug binaries
415+
cargo test -p uv-trampoline-builder --target ${{ matrix.target-arch }}-pc-windows-msvc --no-default-features
421416
422417
typos:
423418
runs-on: ubuntu-latest
@@ -707,7 +702,7 @@ jobs:
707702
708703
- name: "Install free-threaded Python via uv"
709704
run: |
710-
./uv python install 3.13t
705+
./uv python install -v 3.13t
711706
./uv venv -p 3.13t --python-preference only-managed
712707
713708
- name: "Check version"
@@ -779,7 +774,7 @@ jobs:
779774
run: chmod +x ./uv
780775

781776
- name: "Install PyPy"
782-
run: ./uv python install pypy3.9
777+
run: ./uv python install -v pypy3.9
783778

784779
- name: "Create a virtual environment"
785780
run: |
@@ -1617,9 +1612,23 @@ jobs:
16171612
- uses: actions/checkout@v4
16181613

16191614
- name: "Install pyenv"
1620-
uses: "gabrielfalcao/pyenv-action@v18"
1621-
with:
1622-
default: 3.9.7
1615+
run: |
1616+
# Install pyenv
1617+
curl https://pyenv.run | bash
1618+
1619+
# Set up environment variables for current step
1620+
export PYENV_ROOT="$HOME/.pyenv"
1621+
export PATH="$PYENV_ROOT/bin:$PATH"
1622+
eval "$(pyenv init -)"
1623+
1624+
# Install Python 3.9
1625+
pyenv install 3.9
1626+
pyenv global 3.9
1627+
1628+
# Make environment variables persist across steps
1629+
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
1630+
echo "$HOME/.pyenv/bin" >> $GITHUB_PATH
1631+
echo "$HOME/.pyenv/shims" >> $GITHUB_PATH
16231632
16241633
- name: "Download binary"
16251634
uses: actions/download-artifact@v4

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ exclude: |
77
88
repos:
99
- repo: https://github.com/abravalheri/validate-pyproject
10-
rev: v0.21
10+
rev: v0.22
1111
hooks:
1212
- id: validate-pyproject
1313

1414
- repo: https://github.com/crate-ci/typos
15-
rev: v1.26.0
15+
rev: v1.26.8
1616
hooks:
1717
- id: typos
1818

@@ -42,7 +42,7 @@ repos:
4242
types_or: [yaml, json5]
4343

4444
- repo: https://github.com/astral-sh/ruff-pre-commit
45-
rev: v0.7.0
45+
rev: v0.7.1
4646
hooks:
4747
- id: ruff-format
4848
- id: ruff

CHANGELOG.md

Lines changed: 126 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,130 @@
11
# Changelog
22

3+
## 0.4.29
4+
5+
### Enhancements
6+
7+
- Sort errors during display in `uv python install` ([#8684](https://github.com/astral-sh/uv/pull/8684))
8+
- Update resolver to use disjointness checks instead of marker equality ([#8661](https://github.com/astral-sh/uv/pull/8661))
9+
- Add `riscv64` to supported Python platform tags ([#8660](https://github.com/astral-sh/uv/pull/8660))
10+
11+
### Bug fixes
12+
13+
- Fix hard and soft float libc detection for managed Python distributions on ARM ([#8498](https://github.com/astral-sh/uv/pull/8498))
14+
- Handle cycles in `uv pip tree` ([#8689](https://github.com/astral-sh/uv/pull/8689))
15+
- Respect dependency group markers in `uv export` ([#8659](https://github.com/astral-sh/uv/pull/8659))
16+
- Support transitive dependencies in Git workspaces ([#8665](https://github.com/astral-sh/uv/pull/8665))
17+
- Use portable paths for subdirectories in lock URLs ([#8707](https://github.com/astral-sh/uv/pull/8707))
18+
- Update `uv init --virtual` to imply `--no-package` ([#8595](https://github.com/astral-sh/uv/pull/8595))
19+
20+
### Preview
21+
22+
- Install versioned Python executables into the bin directory during `uv python install` (Unix only) ([#8458](https://github.com/astral-sh/uv/pull/8458))
23+
24+
### Documentation
25+
26+
- Clarify relationship between specifiers and `requires-python` range ([#8688](https://github.com/astral-sh/uv/pull/8688))
27+
- Fix broken link in docs ([#8552](https://github.com/astral-sh/uv/pull/8552))
28+
- Fix outdated documentation on `Requires-Python` ([#8679](https://github.com/astral-sh/uv/pull/8679))
29+
- Add Google Artifact Registry index authentication guide ([#8579](https://github.com/astral-sh/uv/pull/8579))
30+
31+
## 0.4.28
32+
33+
### Enhancements
34+
35+
- Add support for requesting free-threaded builds via `+freethreaded` ([#8645](https://github.com/astral-sh/uv/pull/8645))
36+
- Improve trusted publishing error messages ([#8633](https://github.com/astral-sh/uv/pull/8633))
37+
- Remove unneeded `return` from Maturin project template ([#8604](https://github.com/astral-sh/uv/pull/8604))
38+
- Skip Python interpreter discovery for `uv export` ([#8638](https://github.com/astral-sh/uv/pull/8638))
39+
- Hint about missing trusted publishing permission ([#8632](https://github.com/astral-sh/uv/pull/8632))
40+
41+
### Configuration
42+
43+
- Add environment variable to disable progress output ([#8600](https://github.com/astral-sh/uv/pull/8600))
44+
45+
### Bug fixes
46+
47+
- Fork when minimum Python version increases ([#8628](https://github.com/astral-sh/uv/pull/8628))
48+
- Ignore empty groups when validating lock ([#8598](https://github.com/astral-sh/uv/pull/8598))
49+
- Remove duplicate word in error message ([#8589](https://github.com/astral-sh/uv/pull/8589))
50+
- Support cyclic dependencies in `uv tree` ([#8564](https://github.com/astral-sh/uv/pull/8564))
51+
- Update `uv init` to imply `--package` when using `--build-backend` ([#8593](https://github.com/astral-sh/uv/pull/8593))
52+
- Restore use of `dev-dependencies` and `requires-dev` for lockfile compatibility ([#8599](https://github.com/astral-sh/uv/pull/8599))
53+
54+
### Documentation
55+
56+
- Clarify `requires-python` requirement for dependencies ([#8619](https://github.com/astral-sh/uv/pull/8619))
57+
- Update CLI documentation for `--cache-dir` ([#8627](https://github.com/astral-sh/uv/pull/8627))
58+
59+
## 0.4.27
60+
61+
This release includes support for the `[dependency-groups]` table as recently standardized in [PEP 735](https://peps.python.org/pep-0735/). The table allows for declaration of optional dependency groups that are not published as part of the package metadata, unlike `[project.optional-dependencies]`. There are new `--group`, `--only-group`, and `--no-group` options throughout the uv interface.
62+
63+
Previously, uv used a single `tool.uv.dev-dependencies` list for declaration of development dependencies. Now, uv supports declaring development dependencies in a standardized format and allows splitting development dependencies into multiple groups.
64+
65+
For compatibility, and to simplify usage for people that do not need multiple groups, uv special-cases the group named `dev`. The `dev` group is equivalent to `tool.uv.dev-dependencies`. The contents of `tool.uv.dev-dependencies` will merged into the `dev` group in uv's resolver. The `--dev`, `--only-dev`, and `--no-dev` flags remain as aliases for the corresponding `--group` options. Support for `tool.uv.dev-dependencies` remains in this release, but will display warnings in a future release.
66+
67+
uv syncs the `dev` group by default — this matches the exististing behavior for `tool.uv.dev-dependencies`. The default groups can be changed with the `tool.uv.default-groups` setting.
68+
69+
Thank you to Stephen Rosen who authored PEP 735.
70+
71+
### Enhancements
72+
73+
- Support for PEP 735 ([#8272](https://github.com/astral-sh/uv/pull/8272))
74+
- Add support for `--dry-run` mode in `uv lock` ([#7783](https://github.com/astral-sh/uv/pull/7783))
75+
- Don't allow non-string email in authors ([#8520](https://github.com/astral-sh/uv/pull/8520))
76+
- Enforce lockfile schema versions ([#8509](https://github.com/astral-sh/uv/pull/8509))
77+
78+
### Bug fixes
79+
80+
- Always attach URL to network errors ([#8444](https://github.com/astral-sh/uv/pull/8444))
81+
- Fix dangling non-platform dependencies in `uv tree` ([#8532](https://github.com/astral-sh/uv/pull/8532))
82+
- Prefer `lto` over `debug` free-threaded managed Python builds ([#8515](https://github.com/astral-sh/uv/pull/8515))
83+
84+
### Documentation
85+
86+
- Add `tool.uv.sources` to the "Settings" reference ([#8543](https://github.com/astral-sh/uv/pull/8543))
87+
- Add reference to `uv build` and `uv publish` in the landing pages ([#8542](https://github.com/astral-sh/uv/pull/8542))
88+
- Avoid duplicate `[tool.uv]` header in TOML examples ([#8545](https://github.com/astral-sh/uv/pull/8545))
89+
- Document `.netrc` environment variable and path ([#8511](https://github.com/astral-sh/uv/pull/8511))
90+
- Fix `.netrc` typo in authentication docs ([#8521](https://github.com/astral-sh/uv/pull/8521))
91+
- Fix heading level of "Script support" on docs landing page ([#8544](https://github.com/astral-sh/uv/pull/8544))
92+
- Move the installation configuration docs to a separate page ([#8546](https://github.com/astral-sh/uv/pull/8546))
93+
- Update docs for `--publish-url` to avoid duplication. ([#8561](https://github.com/astral-sh/uv/pull/8561))
94+
- Fix typo ([#8554](https://github.com/astral-sh/uv/pull/8554))
95+
- Fix typo in description of `--strict` flag ([#8513](https://github.com/astral-sh/uv/pull/8513))
96+
97+
## 0.4.26
98+
99+
### Enhancements
100+
101+
- Allow static dependency metadata entries for direct URL requirements ([#7846](https://github.com/astral-sh/uv/pull/7846))
102+
- Use reinstall report formatting for `uv python install --reinstall` ([#8487](https://github.com/astral-sh/uv/pull/8487))
103+
- Add support for system-level `uv.toml` configuration ([#7851](https://github.com/astral-sh/uv/pull/7851))
104+
105+
### Bug fixes
106+
107+
- Apply `requires-python` narrowing with upper bounds ([#8403](https://github.com/astral-sh/uv/pull/8403))
108+
- Avoid rewriting `[[tool.uv.index]]` entries when credentials are provided ([#8502](https://github.com/astral-sh/uv/pull/8502))
109+
- Fix `uv add` comment handling for empty arrays ([#8504](https://github.com/astral-sh/uv/pull/8504))
110+
- Replace dashes with underscores in index credential variables ([#8452](https://github.com/astral-sh/uv/pull/8452))
111+
- Respect `--allow-insecure-host` in `uv publish` ([#8440](https://github.com/astral-sh/uv/pull/8440))
112+
- Allow arbitrary `--package` includes in `uv tree` ([#8507](https://github.com/astral-sh/uv/pull/8507))
113+
- Remove existing Python install after successful download in `uv python install` ([#8485](https://github.com/astral-sh/uv/pull/8485))
114+
115+
### Documentation
116+
117+
- Add docs example for URLs with `[tool.uv.dependency-metadata]` ([#8484](https://github.com/astral-sh/uv/pull/8484))
118+
- Add help page for build failures ([#8286](https://github.com/astral-sh/uv/pull/8286))
119+
- Fix `cache-keys` typo in `tags = true` ([#8422](https://github.com/astral-sh/uv/pull/8422))
120+
- Add documentation examples for manual branch, rev, and tag Git dependencies ([#8497](https://github.com/astral-sh/uv/pull/8497))
121+
122+
### Error messages
123+
124+
- Improve error message for cache info serialization ([#8500](https://github.com/astral-sh/uv/pull/8500))
125+
- Suggest `--from` command when executable is available for `uvx` ([#8473](https://github.com/astral-sh/uv/pull/8473))
126+
- Support `--with-editable` in `uv tool install` ([#8472](https://github.com/astral-sh/uv/pull/8472))
127+
3128
## 0.4.25
4129

5130
### Enhancements
@@ -1901,8 +2026,7 @@ and `uv tool run` ([#4717](https://github.com/astral-sh/uv/pull/4717))
19012026
- Add `uv tool uninstall` ([#4641](https://github.com/astral-sh/uv/pull/4641))
19022027
- Add support for specifying `name@version` in `uv tool run` ([#4572](https://github.com/astral-sh/uv/pull/4572))
19032028
- Allow `uv add` to specify optional dependency groups ([#4607](https://github.com/astral-sh/uv/pull/4607))
1904-
- Allow the package spec to be passed positionally
1905-
in `uv tool install` ([#4564](https://github.com/astral-sh/uv/pull/4564))
2029+
- Allow the package spec to be passed positionally in `uv tool install` ([#4564](https://github.com/astral-sh/uv/pull/4564))
19062030
- Avoid infinite loop for cyclic installs ([#4633](https://github.com/astral-sh/uv/pull/4633))
19072031
- Indent wheels like dependencies in the lockfile ([#4582](https://github.com/astral-sh/uv/pull/4582))
19082032
- Sync all packages in a virtual workspace ([#4636](https://github.com/astral-sh/uv/pull/4636))

0 commit comments

Comments
 (0)