1100 Commits

Author SHA1 Message Date
Zanie Blue
5ef3d51390 Bump version to 0.5.26 (#11119) 2025-01-30 15:37:00 -06:00
Zanie Blue
9c07c3fc5b Bump version to 0.5.25 (#11042) 2025-01-28 15:40:43 -06:00
renovate[bot]
b1706ad8be Update Rust crate rustix to v0.38.44 (#10974) 2025-01-26 22:23:02 -05:00
renovate[bot]
bcbc35c844 Update Rust crate fs-err to v3.1.0 (#10976) 2025-01-27 02:49:02 +00:00
renovate[bot]
fb545130eb Update Rust crate rkyv to v0.8.10 (#10973) 2025-01-27 02:23:24 +00:00
renovate[bot]
a1ce4aac59 Update Rust crate jiff to v0.1.27 (#10972) 2025-01-26 21:21:01 -05:00
renovate[bot]
f1f0730bc9 Update Rust crate insta to v1.42.1 (#10971) 2025-01-26 21:20:54 -05:00
renovate[bot]
20c0385bb3 Update Rust crate clap to v4.5.27 (#10970) 2025-01-26 21:20:47 -05:00
Zanie Blue
42fae925c4 Bump version to 0.5.24 (#10922) 2025-01-23 17:26:59 -06:00
Charlie Marsh
ba42467f1b Bump version to v0.5.23 (#10879) 2025-01-23 00:26:10 +00:00
Charlie Marsh
1372c4e6de Include commit_id and requested_revision in direct_url.json (#10862)
## Summary

Closes #3014.

Closes #10846.
2025-01-22 12:16:49 -05:00
Charlie Marsh
4574ced370 Bump version to v0.5.22 (#10829) 2025-01-21 17:03:55 -05:00
Charlie Marsh
25982929c2 Include version and contact information in GitHub User Agent (#10785)
## Summary

See: https://github.com/astral-sh/uv/pull/10765#discussion_r1922016112
2025-01-20 14:30:04 -05:00
Charlie Marsh
5ee4cf6ff5 Fetch pyproject.toml from GitHub API (#10765)
## Summary

When resolving Git metadata, we may be able to fetch the metadata from
GitHub directly in some cases. This is _way_ faster, since we don't need
to perform many Git operations and, in particular, don't need to clone
the repo.

This only works in the following cases:

- The Git repository is public. Otherwise, I believe you need an access
token, which we don't have.
- The `pyproject.toml` has static metadata.
- The `pyproject.toml` has no `tool.uv.sources`. Otherwise, we need to
lower them... And, if there are any paths or workspace sources, that
requires an install path (i.e., we need the content on-disk).
- The project is in the repo root. If it's in a subdirectory, it could
be a workspace member. And if it's a workspace member, there could be
sources defined in the workspace root. But we can't know without
fetching the workspace root -- and we need the workspace in order to
find the root...

Closes #10568.
2025-01-20 17:50:39 +00:00
renovate[bot]
53dfac5529 Update Rust crate similar to v2.7.0 (#10769) 2025-01-20 02:06:08 +00:00
renovate[bot]
5845b9a691 Update Rust crate indexmap to v2.7.1 (#10767) 2025-01-20 01:53:58 +00:00
renovate[bot]
a449072e6d Update Rust crate data-encoding to v2.7.0 (#10764) 2025-01-20 01:46:39 +00:00
renovate[bot]
5a7545ae35 Update Rust crate jiff to v0.1.24 (#10759) 2025-01-19 20:44:52 -05:00
renovate[bot]
05fcc50758 Update Rust crate test-log to v0.2.17 (#10761) 2025-01-19 20:42:55 -05:00
renovate[bot]
2ae3f69fd9 Update Rust crate bitflags to v2.8.0 (#10763) 2025-01-20 01:41:34 +00:00
renovate[bot]
0ff9c250ec Update Rust crate serde_json to v1.0.137 (#10760) 2025-01-19 20:35:14 -05:00
Charlie Marsh
3478c068bb Bump version to v0.5.21 (#10723) 2025-01-17 20:53:36 +00:00
Charlie Marsh
bc8002e26e Avoid narrowing requires-python marker with disjunctions (#10704)
## Summary

A bug in `requires_python` (which infers the Python requirement from a
marker) was leading us to break an invariant around the relationship
between the marker environment and the Python requirement. This, in
turn, was leading us to drop parts of the environment space when
solving.

Specifically, in the linked example, we generated a fork for
`python_full_version < '3.10' or platform_python_implementation !=
'CPython'`, which was later split into `python_full_version == '3.8.*'`
and `python_full_version == '3.9.*'`, losing the
`platform_python_implementation != 'CPython'` portion.

Closes https://github.com/astral-sh/uv/issues/10669.
2025-01-17 16:25:32 +00:00
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