Commit Graph

5489 Commits

Author SHA1 Message Date
konsti
b40fa912e0 Ignore lockfile in ecosystem tests (#10775) 2025-01-20 10:34:46 +00:00
renovate[bot]
6bf84b4d4c Update pre-commit hook astral-sh/ruff-pre-commit to v0.9.2 (#10762) 2025-01-19 22:30:10 -05: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
c0bde88f6c Remove TOCTOU errors in Git clone (#10758)
## Summary

We should try to remove, then fail gracefully, rather than checking
existence.
2025-01-19 20:31:15 -05:00
Charlie Marsh
23e892011c Remove URL conversions in Git path (#10757)
## Summary

We convert from `Url` to `&str` back to `Url`.
2025-01-19 23:00:42 +00:00
Charlie Marsh
5e5cb8797d Remove unused Git resolver methods (#10754) 2025-01-19 17:02:53 +00:00
Charlie Marsh
c306e46e1d Remove trailing commas before brackets (#10740) 2025-01-18 19:56:46 +00:00
Charlie Marsh
ae366ccd0e Remove unnecessary clone on package name (#10741) 2025-01-18 19:45:19 +00:00
Charlie Marsh
35aec8863e Use colors for lock errors (#10736)
## Summary

These now better match the errors we show when failing to resolve.
2025-01-18 18:50:20 +00:00
Charlie Marsh
3fe4e7168b Use short-form for platform tag checks (#10737) 2025-01-18 18:22:09 +00:00
Charlie Marsh
1bfa7230fc Correct documentation for wheel tag hints (#10735)
These were copy-pasted by accident.
2025-01-18 18:13:21 +00:00
Charlie Marsh
ddff891397 Use iterators rather than eagerly collecting tags (#10734) 2025-01-18 13:11:48 -05:00
Charlie Marsh
4f807473d3 Avoid using NumPy, Pandas, etc. in tool tests (#10725)
## Summary

Closes https://github.com/astral-sh/uv/issues/10645.
2025-01-17 18:20:26 -05:00
Charlie Marsh
3478c068bb Bump version to v0.5.21 (#10723) 0.5.21 2025-01-17 20:53:36 +00:00
Zanie Blue
896435faec Use D: drive for Windows CI (#10180)
When using the standard Windows runners (as opposed to the _larger_
GitHub runners), an undocumented `D:` drive is available and performant.
We can save some money on by using this on a standard runner instead of
a larger runner with an ReFS drive. Switching to the `D:` drive was not
acceptable for `cargo test` >25m runtime.

Inspired by https://github.com/pypa/pip/pull/13129
See https://github.com/actions/runner-images/issues/8755

Timings (grain of salt — GitHub is super noisy):

- clippy: 2m 18s -> 2m 11s
- build binary: 2m 3s -> 2m 35s
- trampoline check (x86-64): 2m 32s -> 1m 50s (other architectures
similar)
- trampoline test (x86-64): 4m 12s -> 6m 7s
- trampoline test (i686): 6m 44s -> 5m 35s
2025-01-17 13:57:09 -06:00
Charlie Marsh
a7f67e877c Avoid attempting to patch macOS dylib for non-macOS installs (#10721)
## Summary

For example, `cargo run python install
cpython-3.12.8-linux-x86_64_v3-gnu` (on macOS) shouldn't attempt to
patch the dylib. At present, it leads to this warning:

```
warning: Failed to patch the install name of the dynamic library for /Users/crmarsh/.local/share/uv/python/cpython-3.12.8-linux-x86_64_v3-gnu/bin/python3.12. This may cause issues when building Python native extensions.
Underlying error: Failed to update the install name of the Python dynamic library located at `/Users/crmarsh/.local/share/uv/python/cpython-3.12.8-linux-x86_64_v3-gnu/lib/libpython3.12.dylib`
```
2025-01-17 19:21:32 +00:00
Charlie Marsh
08da17d035 Respect environment variable credentials for indexes outside root (#10688)
## Summary

We now respect environment variable-based authentication when the
explicit index is defined outside of the workspace root. This applies to
both local and Git-based projects.

Closes https://github.com/astral-sh/uv/issues/10680.
2025-01-17 13:55:09 -05:00
Zanie Blue
e2da86ae09 Fix typo (#10720) 2025-01-17 12:54:14 -06:00
Zanie Blue
48140feacb Add MACOSX_DEPLOYMENT_TARGET to the --python-platform documentation (#10698) 2025-01-17 18:49:00 +00:00
Se7en
d5b98fb76c fix: links in configuring projects doc (#10710)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

Fix invalid links in [configuring
projects](https://docs.astral.sh/uv/concepts/projects/config/#entry-points)
doc.

## Test Plan

<!-- How was it tested? -->
2025-01-17 12:39:56 -06:00
Henry Schreiner
5e86e0bf4f fix: ignore permission errors too when looking for user file (#10697)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

The new ARM runners report a permission error:

```
Run uvx twine check wheelhouse/*
error: failed to open file `/home/runneradmin/.config/uv/uv.toml`: Permission denied (os error 13)
```

In this PR, a PermissionsError is treated like not finding the file.

I reworked the structure just a bit to avoid calling `err.kind()`
multiple times.

## Test Plan

<!-- How was it tested? -->

Added a UNIX only test where I set the permissions of the folder
containing the file and try to find it.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2025-01-17 12:28:00 -05:00
Charlie Marsh
e02a7bb75d Sort preferences by environment, then index (#10700)
## Summary

This has a few effects:

1. We only call `preferences` once, which should be more efficient.
2. We collect `preferences` into a vector when there are multiple. Less
efficient, but pretty rare?
3. We now correctly prefer preferences from the same index.
2025-01-17 17:27:44 +00:00
Charlie Marsh
1f29165796 Add UV_VENV_SEED environment variable (#10715)
## Summary

Closes https://github.com/astral-sh/uv/issues/7655.
2025-01-17 12:08:55 -05:00
Charlie Marsh
8111650100 Avoid returning Some for narrowing no-ops (#10705)
The net effect here is (I think) just that we end up logging more
"narrowing" outcomes than we have in practice.
2025-01-17 16:41:17 +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
dce7b9da13 Store unsupported tags in wheel filename (#10665)
## Summary

We can retain the small-size advantage of our new tags by moving the
"unknown tag" case into `WheelTagLarge`. This ensures that we can still
represent unknown tags, but avoid paying the cost for them.
2025-01-17 04:41:53 +00:00
Charlie Marsh
80bdb3a997 Avoid building dynamic versions when validating lockfile (#10703)
## Summary

Closes #10689.
2025-01-17 04:27:46 +00:00
Charlie Marsh
4956c9a7a5 Add SyntaxWarning compatibility note to bytecode compilation docs (#10701) 2025-01-16 22:26:03 -05:00
Zanie Blue
33446091d2 Improve the styling of collapsible nav items (#10692)
I've been a bit unhappy with the collapsible project section. I think it
feels a little crowded and consequently hard to read. Here, we tweak the
styling to decrease the font size a little and increase the margins. I
aimed for a subtle change — we can change it more drastically later if
we want.

Before
<img width="1414" alt="Screenshot 2025-01-16 at 12 35 38 PM"
src="https://github.com/user-attachments/assets/820b87c6-2988-4170-87ae-cec9a0f3b4fb"
/>
After
<img width="1414" alt="Screenshot 2025-01-16 at 12 35 16 PM"
src="https://github.com/user-attachments/assets/0d0cdb6b-a6c6-4fe1-a7f2-48f6fd70d5bc"
/>
2025-01-16 15:02:43 -06:00
Charlie Marsh
45455b33c0 Respect preferences for explicit index dependencies from requirements.txt (#10690)
## Summary

Closes: https://github.com/astral-sh/uv/issues/10383.
2025-01-16 18:10:00 +00:00
Zanie Blue
75a1a47859 Improve performance of our test drive in Windows CI (#10651)
Previously, we couldn't use a DevDrive
(https://github.com/astral-sh/uv/pull/3522#issuecomment-2111448930)
because our Windows version was not sufficient.

Recently, I upgraded our larger runners to Windows 2025 preview
(https://github.com/astral-sh/uv/pull/10298) which I presume has support
for this.

I removed ReFS in
953c3535c3
which didn't seem to do anything to performance.

I also found some notes on "trusted" DevDrives and "disabling anti-virus
filtering" which I simply have to try.
2025-01-16 12:07:09 -06:00
Zanie Blue
50c6465ad8 Add feature-gate to ecosystem tests and disable on Windows CI (#10649)
These tests should be platform independent and are particularly
expensive to run
2025-01-16 16:02:06 +00:00
Zanie Blue
11f2882211 Simplify valid_link determination in python install (#10642)
Addresses review feedback at
https://github.com/astral-sh/uv/pull/10639#discussion_r1917263236
2025-01-16 09:53:07 -06:00
Daniel Hollas
6c572db056 Make running uv version error clearer (#10676)
The existing error for when the installed uv version does not match the
required version might be confusing, hopefully this makes it clearer.
2025-01-16 10:13:24 -05:00
konsti
8b1d3de4fc Log source file on compile timeout (#10672)
Log the file that failed to bytecode compile when encountering a timeout
for debugging #6105 better.

[sysinfo](https://lib.rs/crates/sysinfo) would give us the option to
report memory usage too, but i'm hesitant to add a dependency just for
the error path.
2025-01-16 10:01:23 -05:00
Mathieu Kniewallner
b46c6db317 docs: fix a few typos (#10675)
## Summary

Fixing a few typos found in the documentation and in comments.
2025-01-16 09:53:59 -05:00
Zanie Blue
73cade1386 Drop expensive packages numpy and boltons from sync_editable test (#10647)
These were introduced in https://github.com/astral-sh/uv/pull/587 but
are now showing up in our slow test list (#878) and we previously pared
down the `poetry_editable` test case dependencies — I think these were
just missed.
2025-01-15 17:33:27 -06:00
Charlie Marsh
ee6ba41d46 Add support for pypy_73-style tags (#10660)
## Summary

I'm inferring that these are like... the older tag format? See, e.g.:

```
soxbindings-0.0.1-pp27-pypy_73-macosx_10_9_x86_64.whl
soxbindings-0.0.1-pp27-pypy_73-manylinux2010_x86_64.whl
soxbindings-0.0.1-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
soxbindings-0.0.1-pp36-pypy36_pp73-manylinux2010_x86_64.whl
```
2025-01-15 23:27:17 +00:00
Charlie Marsh
1c17662b37 Bump version to v0.5.20 (#10659) 0.5.20 2025-01-15 23:18:06 +00:00
Charlie Marsh
64e6e7c4f9 Add win_ia64 tag (#10658)
## Summary

No practical effect, but it is a valid tag.
2025-01-15 23:14:49 +00:00
Charlie Marsh
ed34d37e3c Avoid failing when deserializing unknown tags (#10655)
## Summary

Closes
https://github.com/astral-sh/uv/issues/10654#issuecomment-2594022975.
2025-01-15 18:03:28 -05:00
Zanie Blue
37e31c38cb Drop expensive package boltons from tool_uv_sources test (#10652) 2025-01-15 16:42:30 -06:00
Zanie Blue
3d48e1ea4c Fix outdated comment in Cargo.toml for performance feature (#10650)
It really does not look like this turns on self-update
2025-01-15 16:42:24 -06:00
Zanie Blue
a7f13e0e0b Bump version to 0.5.19 (#10643) 0.5.19 2025-01-15 20:56:43 +00:00