1077 Commits

Author SHA1 Message Date
Charlie Marsh
1c17662b37 Bump version to v0.5.20 (#10659) 2025-01-15 23:18:06 +00:00
Zanie Blue
a7f13e0e0b Bump version to 0.5.19 (#10643) 2025-01-15 20:56:43 +00:00
Charlie Marsh
d20a48a5b4 Use memchr for wheel parsing (#10620)
## Summary

Before:

```
wheelname_parsing/numpy-compatible
                        time:   [106.90 ns 107.86 ns 108.86 ns]
                        thrpt:  [402.97 MiB/s 406.71 MiB/s 410.39 MiB/s]
                 change:
                        time:   [-4.5360% -3.7694% -2.9179%] (p = 0.00 < 0.05)
                        thrpt:  [+3.0056% +3.9170% +4.7515%]
                        Performance has improved.
wheelname_parsing/flyte-short-incompatible
                        time:   [81.439 ns 82.209 ns 83.015 ns]
                        thrpt:  [390.59 MiB/s 394.42 MiB/s 398.15 MiB/s]
                 change:
                        time:   [+6.2344% +7.5385% +8.8928%] (p = 0.00 < 0.05)
                        thrpt:  [-8.1666% -7.0101% -5.8685%]
                        Performance has regressed.
wheelname_parsing/flyte-short-compatible
                        time:   [78.909 ns 79.456 ns 80.031 ns]
                        thrpt:  [357.49 MiB/s 360.08 MiB/s 362.57 MiB/s]
                 change:
                        time:   [+3.2653% +4.1733% +5.1062%] (p = 0.00 < 0.05)
                        thrpt:  [-4.8582% -4.0061% -3.1620%]
                        Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
wheelname_parsing/flyte-long-incompatible
                        time:   [353.35 ns 357.49 ns 361.77 ns]
                        thrpt:  [340.06 MiB/s 344.13 MiB/s 348.17 MiB/s]
                 change:
                        time:   [+1.4846% +2.0228% +2.6504%] (p = 0.00 < 0.05)
                        thrpt:  [-2.5820% -1.9827% -1.4629%]
                        Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
  5 (5.00%) high mild
  5 (5.00%) high severe
wheelname_parsing/flyte-long-compatible
                        time:   [256.47 ns 258.12 ns 260.17 ns]
                        thrpt:  [417.88 MiB/s 421.20 MiB/s 423.90 MiB/s]
                 change:
                        time:   [+0.4079% +1.8252% +3.6270%] (p = 0.02 < 0.05)
                        thrpt:  [-3.5001% -1.7925% -0.4063%]
                        Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
```

After:

```
wheelname_parsing_fastest/numpy-compatible
                        time:   [61.500 ns 61.904 ns 62.350 ns]
                        thrpt:  [703.60 MiB/s 708.66 MiB/s 713.32 MiB/s]
                 change:
                        time:   [+0.9879% +1.4542% +1.9311%] (p = 0.00 < 0.05)
                        thrpt:  [-1.8945% -1.4334% -0.9782%]
                        Change within noise threshold.
Found 8 outliers among 100 measurements (8.00%)
  6 (6.00%) high mild
  2 (2.00%) high severe
wheelname_parsing_fastest/flyte-short-incompatible
                        time:   [49.341 ns 49.538 ns 49.769 ns]
                        thrpt:  [651.50 MiB/s 654.54 MiB/s 657.16 MiB/s]
                 change:
                        time:   [+5.8750% +6.3656% +6.8338%] (p = 0.00 < 0.05)
                        thrpt:  [-6.3967% -5.9847% -5.5490%]
                        Performance has regressed.
Found 17 outliers among 100 measurements (17.00%)
  5 (5.00%) low severe
  1 (1.00%) low mild
  6 (6.00%) high mild
  5 (5.00%) high severe
wheelname_parsing_fastest/flyte-short-compatible
                        time:   [49.425 ns 49.789 ns 50.193 ns]
                        thrpt:  [570.01 MiB/s 574.63 MiB/s 578.86 MiB/s]
                 change:
                        time:   [+5.1267% +5.7418% +6.3476%] (p = 0.00 < 0.05)
                        thrpt:  [-5.9687% -5.4300% -4.8767%]
                        Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild
wheelname_parsing_fastest/flyte-long-incompatible
                        time:   [295.81 ns 298.01 ns 301.04 ns]
                        thrpt:  [408.66 MiB/s 412.82 MiB/s 415.89 MiB/s]
                 change:
                        time:   [+0.5553% +1.0842% +1.7059%] (p = 0.00 < 0.05)
                        thrpt:  [-1.6772% -1.0726% -0.5523%]
                        Change within noise threshold.
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe
wheelname_parsing_fastest/flyte-long-compatible
                        time:   [214.80 ns 216.10 ns 217.50 ns]
                        thrpt:  [499.87 MiB/s 503.10 MiB/s 506.15 MiB/s]
                 change:
                        time:   [+0.9003% +1.3207% +1.8268%] (p = 0.00 < 0.05)
                        thrpt:  [-1.7940% -1.3035% -0.8923%]
                        Change within noise threshold.
Found 8 outliers among 100 measurements (8.00%)
  7 (7.00%) high mild
  1 (1.00%) high severe
```

(Ignore the percent changes; they're not relative to one another.)

So it's like >40% faster for the small case and >15% faster for the
large case.
2025-01-15 11:39:25 -05:00
Charlie Marsh
279043f864 Include build tag in rendered wheel filenames (#10599)
## Summary

I don't think this had an impact in practice, but it is "wrong" to omit
these. Confirmed that the cache (for example) now includes the build tag
(as in, `mkl_fft-1.3.8-72-cp310-cp310-manylinux2014_x86_64`).
2025-01-14 15:01:45 +00:00
Charlie Marsh
faa4481ccc Shrink size of platform tag enum (#10546)
## Summary

Reduces it from 56 bytes to 16 bytes.
2025-01-14 03:13:59 +00:00
Charlie Marsh
5c91217488 Use structured wheel tags everywhere (#10542)
## Summary

This PR extends the thinking in #10525 to platform tags, and then uses
the structured tag enums everywhere, rather than passing around strings.
I think this is a big improvement! It means we're no longer doing ad hoc
tag parsing all over the place.
2025-01-14 01:39:39 +00:00
Charlie Marsh
2ffa31946d Show expected and available ABI tags in resolver errors (#10527)
## Summary

The idea here is to show both (1) an example of a compatible tag and (2)
the tags that were available, whenever we fail to resolve due to an
abscence of matching wheels.

Closes https://github.com/astral-sh/uv/issues/2777.
2025-01-14 01:03:11 +00:00
samypr100
73f60bbd2c chore: update windows-registry and windows-result crates (#10532)
## Summary

Closes https://github.com/astral-sh/uv/pull/10517
Closes https://github.com/astral-sh/uv/pull/10516

They need to be updated together.
2025-01-13 18:06:34 -05:00
renovate[bot]
b38d3fec64 Update Rust crate jiff to v0.1.22 (#10550) 2025-01-12 20:33:01 -05:00
Charlie Marsh
1e48c12837 Add a shared uv-small-str crate (#10545)
## Summary

I want to use `SmallString` elsewhere.
2025-01-12 20:23:18 +00:00
Sergei Nizovtsev
051aaa5fe5 Fix git-tag cache-key reader in case of slashes (#10467) (#10500)
## Summary

The assumption that all tags are listed under a flat `.git/ref/tags`
structure was wrong. Git creates a hierarchy of directories for tags
containing slashes. To fix the cache key calculation, we need to
recursively traverse all files under that folder instead.

## Test Plan

1. Create an `uv` project with git-tag cache-keys;
2. Add any tag with slash;
3. Run `uv sync` and see uv_cache_info error in verbose log;
4. `uv sync` doesn't trigger reinstall on next tag addition or removal;
5. With fix applied, reinstall triggers on every tag update and there
are no errors in the log.

Fixes #10467

---------

Co-authored-by: Sergei Nizovtsev <sergei.nizovtsev@eqvilent.com>
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-01-11 21:30:46 -05:00
renovate[bot]
5aa53863a7 Update Rust crate rustix to v0.38.43 (#10508) 2025-01-11 19:26:21 +00:00
renovate[bot]
8e0c7cfd76 Update Rust crate clap to v4.5.26 (#10503) 2025-01-11 19:24:45 +00:00
renovate[bot]
2c021e2f7d Update Rust crate winreg to 0.53.0 (#10518) 2025-01-11 18:08:13 +00:00
renovate[bot]
69102e0563 Update Rust crate tokio to v1.43.0 (#10514) 2025-01-11 17:55:31 +00:00
renovate[bot]
08569667cb Update Rust crate bitflags to v2.7.0 (#10512) 2025-01-11 12:29:13 -05:00
renovate[bot]
ed5a53f01b Update Rust crate thiserror to v2.0.11 (#10511) 2025-01-11 12:29:03 -05:00
renovate[bot]
3e2a8cbd04 Update Rust crate syn to v2.0.96 (#10510) 2025-01-11 12:28:56 -05:00
renovate[bot]
bee6eff235 Update Rust crate serde_json to v1.0.135 (#10509) 2025-01-11 12:28:23 -05:00
renovate[bot]
94d4babe1a Update Rust crate proc-macro2 to v1.0.93 (#10506) 2025-01-11 12:27:53 -05:00
renovate[bot]
716f3ec9eb Update Rust crate goblin to v0.9.3 (#10504) 2025-01-11 12:27:01 -05:00
renovate[bot]
59eb60b819 Update Rust crate cargo-util to v0.2.17 (#10502) 2025-01-11 12:26:44 -05:00
renovate[bot]
aa1fd76a15 Update Rust crate async-trait to v0.1.85 (#10501) 2025-01-11 12:26:36 -05:00
Charlie Marsh
27d1bad550 Bump version to v0.5.18 (#10499) 2025-01-11 14:38:26 +00:00
Charlie Marsh
c198e2233e Bump version to v0.5.17 (#10480) 2025-01-10 15:52:56 -05:00
Charlie Marsh
8420195aa7 Use ArcStr for marker values (#10453)
N.B. After fixing #10430, `ArcStr` became the fastest implementation
(and the gains were significantly reduced, down to 1-2%). See:
https://github.com/astral-sh/uv/pull/10453#issuecomment-2583344414.

## Summary

I tried out a variety of small string crates, but `Arc<str>`
outperformed them, giving a ~10% speed-up:

```console
❯ hyperfine "../arcstr lock" "../flexstr lock" "uv lock" "../arc lock" "../compact_str lock" --prepare "rm -f uv.lock" --min-runs 50 --warmup 20
Benchmark 1: ../arcstr lock
  Time (mean ± σ):     304.6 ms ±   2.3 ms    [User: 302.9 ms, System: 117.8 ms]
  Range (min … max):   299.0 ms … 311.3 ms    50 runs

Benchmark 2: ../flexstr lock
  Time (mean ± σ):     319.2 ms ±   1.7 ms    [User: 317.7 ms, System: 118.2 ms]
  Range (min … max):   316.8 ms … 323.3 ms    50 runs

Benchmark 3: uv lock
  Time (mean ± σ):     330.6 ms ±   1.5 ms    [User: 328.1 ms, System: 139.3 ms]
  Range (min … max):   326.6 ms … 334.2 ms    50 runs

Benchmark 4: ../arc lock
  Time (mean ± σ):     303.0 ms ±   1.2 ms    [User: 301.6 ms, System: 118.4 ms]
  Range (min … max):   300.3 ms … 305.3 ms    50 runs

Benchmark 5: ../compact_str lock
  Time (mean ± σ):     320.4 ms ±   2.0 ms    [User: 318.7 ms, System: 120.8 ms]
  Range (min … max):   317.3 ms … 326.7 ms    50 runs

Summary
  ../arc lock ran
    1.01 ± 0.01 times faster than ../arcstr lock
    1.05 ± 0.01 times faster than ../flexstr lock
    1.06 ± 0.01 times faster than ../compact_str lock
    1.09 ± 0.01 times faster than uv lock
```
2025-01-10 15:15:12 -05:00
Charlie Marsh
b3d7beb1a0 Use arcstr for package, extra, and group names (#10475)
## Summary

This appears to be a consistent 1% performance improvement and should
also reduce memory quite a bit. We've also decided to use these for
markers, so it's nice to use the same optimization here.

```
❯ hyperfine "./uv pip compile --universal scripts/requirements/airflow.in" "./arcstr pip compile --universal scripts/requirements/airflow.in" --min-runs 50 --warmup 20
Benchmark 1: ./uv pip compile --universal scripts/requirements/airflow.in
  Time (mean ± σ):     136.3 ms ±   4.0 ms    [User: 139.1 ms, System: 241.9 ms]
  Range (min … max):   131.5 ms … 149.5 ms    50 runs

Benchmark 2: ./arcstr pip compile --universal scripts/requirements/airflow.in
  Time (mean ± σ):     134.9 ms ±   3.2 ms    [User: 137.6 ms, System: 239.0 ms]
  Range (min … max):   130.1 ms … 151.8 ms    50 runs

Summary
  ./arcstr pip compile --universal scripts/requirements/airflow.in ran
    1.01 ± 0.04 times faster than ./uv pip compile --universal scripts/requirements/airflow.in
```
2025-01-10 19:46:36 +00:00
Aria Desires
e2c5526fbb replace backoff with backon (#10442)
This should be essentially the exact same behaviour, but backon is a
total API redesign, so things had to be expressed slightly differently.
Overall I think the code is more readable, which is nice.

Fixes #10001
2025-01-09 16:01:23 -05:00
Charlie Marsh
14b685d9fb Warn-and-ignore for unsupported requirements.txt options (#10420)
## Summary

Closes https://github.com/astral-sh/uv/issues/10366.
2025-01-09 13:19:51 -05:00
renovate[bot]
ad09070dd7 Update Rust crate petgraph to 0.7.1 (#10317) 2025-01-08 18:39:26 +00:00
Charlie Marsh
333f03f112 Bump version to v0.5.16 (#10395) 2025-01-08 10:29:32 -05:00
Charlie Marsh
c8b3e8523c Re-enable zlib-ng on x86 platforms (#10365)
## Summary

Closes https://github.com/astral-sh/uv/issues/10363.
2025-01-07 11:00:32 -05:00
konsti
c6ac121ed0 Refactor batch prefetch (#10349) 2025-01-07 14:58:36 +01:00
Zanie Blue
eb6ad9a4fa Bump version to 0.5.15 (#10337) 2025-01-06 18:04:25 -06:00
renovate[bot]
16097b51c4 Update Rust crate tempfile to v3.15.0 (#10318) 2025-01-05 21:29:38 -05:00
renovate[bot]
98d06f40f5 Update Rust crate insta to v1.42.0 (#10314) 2025-01-05 21:27:30 -05:00
renovate[bot]
5aefe69ecf Update Rust crate itertools to 0.14.0 (#10316) 2025-01-05 21:27:14 -05:00
renovate[bot]
0b9519b1fc Update Rust crate syn to v2.0.95 (#10312) 2025-01-06 01:19:11 +00:00
renovate[bot]
f93ada48e9 Update Rust crate spdx to v0.10.8 (#10311) 2025-01-06 01:16:15 +00:00
renovate[bot]
af23311d15 Update Rust crate jiff to v0.1.21 (#10310) 2025-01-06 01:12:57 +00:00
renovate[bot]
f4cca71c0b Update Rust crate async-trait to v0.1.84 (#10309) 2025-01-06 01:11:44 +00:00
renovate[bot]
fbe6f1edf4 Update Rust crate reqwest to v0.12.12 (#10227) 2025-01-03 12:18:43 -05:00
Charlie Marsh
9f1ba2b967 Bump version to v0.5.14 (#10279) 2025-01-02 14:31:04 -05:00
Charlie Marsh
c77aa5820b Add a required version setting to uv (#10248)
## Summary

This follows Ruff's design exactly: you can provide a version specifier
(like `>=0.5`), and we'll enforce it at runtime.

Closes https://github.com/astral-sh/uv/issues/8605.
2024-12-31 15:37:46 +00:00
renovate[bot]
0ea4f5f8b1 Update Rust crate syn to v2.0.93 (#10229) 2024-12-30 03:03:52 +00:00
renovate[bot]
78e246f043 Update Rust crate serde to v1.0.217 (#10228) 2024-12-30 02:56:19 +00:00
renovate[bot]
4623ab32be Update Rust crate jiff to v0.1.16 (#10226) 2024-12-30 02:55:16 +00:00
renovate[bot]
07f6596933 Update Rust crate glob to v0.3.2 (#10225) 2024-12-30 02:43:47 +00:00
renovate[bot]
19fc8865fb Update Rust crate boxcar to v0.2.8 (#10224) 2024-12-30 02:42:41 +00:00
Charlie Marsh
cecff3a726 Guard against self-deletion in uv venv and uv tool (#10206)
## Summary

Closes https://github.com/astral-sh/uv/issues/1327.
2024-12-29 10:46:45 -05:00