Commit Graph

5251 Commits

Author SHA1 Message Date
Charlie Marsh
d2f58d9299 Update reqwest (#10178) 2024-12-26 14:16:12 -05:00
Charlie Marsh
b6697a777c Run cargo update (#10173) 2024-12-26 12:00:58 -05:00
Charlie Marsh
74112553bf Avoid cloning script when discovering interpreter (#10172) 2024-12-26 15:43:55 +00:00
Charlie Marsh
79dce7391e Avoid need for universal markers in requirements.txt export (#10171) 2024-12-26 15:32:32 +00:00
Charlie Marsh
0b5c0220b5 Allow environment variables to be included in cache keys (#10170)
## Summary

Closes https://github.com/astral-sh/uv/issues/8130.
2024-12-26 15:31:49 +00:00
Frost Ming
e6126ce0dc fix: always write slash paths to RECORD file (#10164)
Signed-off-by: Frost Ming <me@frostming.com>

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

This PR solves an issue on Windows that platform-specific paths are
written to the `RECORD` file when installing, which is inconsistent with
PEP 376, quoting:

> Each record is composed of three elements:
>
>the file’s path
> * a ‘/’-separated path, relative to the base location, if the file is
under the base location.
> * a ‘/’-separated path, relative to the base location, if the file is
under the installation prefix AND if the base location is a subpath of
the installation prefix.
> * an absolute path, using the local platform separator

## Test Plan

<!-- How was it tested? -->
Test case included

---------

Signed-off-by: Frost Ming <me@frostming.com>
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-12-26 09:33:32 -05:00
Charlie Marsh
20df970a56 Nest setup code under unnamed requirements block (#10163) 2024-12-25 23:40:11 +00:00
Charlie Marsh
f40da39baf Store absolute paths in PEP 723 scripts (#10161) 2024-12-25 20:23:39 +00:00
Charlie Marsh
bec8468183 Remove unnecessary prefixes (#10158) 2024-12-25 14:18:01 -05:00
Charlie Marsh
3cb723220e Remove anyhow::Result for lock serialization (#10151) 2024-12-25 01:24:26 +00:00
Charlie Marsh
facd21a679 Replace Option<BTreeSet> with BTreeSet for members (#10150) 2024-12-25 00:37:46 +00:00
Charlie Marsh
f872b56124 Add a lock target abstraction (#10129)
## Summary

This PR introduces a `LockTarget`, which is peer to `InstallTarget` and
enables us to capture the common functionality necessary to support
locking.

For now, to minimize changes, only the `Workspace` target is
implemented. In a future PR, I'll add a `Script` target for both locking
and installing.
2024-12-24 19:26:31 -05:00
Charlie Marsh
7c47a457d9 Move installable targets out of uv-resolver crate (#10126)
## Summary

The proximate motivation is that I want to add new variant for scripts,
but `uv-resolver` can't depend on `uv-scripts` without creating a
circular dependency. However, I think this _does_ just make more sense
-- the resolver crate shouldn't be coupled to the various kinds of
workspaces, and these details are mostly encoded in `projects/lock.rs`
and similar files.
2024-12-24 19:01:50 -05:00
Charlie Marsh
6745a8b00a Show non-project dependencies in uv tree (#10149)
## Summary

Closes #10147.
2024-12-24 23:34:58 +00:00
Charlie Marsh
e09b1080f4 Store dependency groups separate from dependencies in lockfile (#10148)
## Summary

This is necessary for some future improvements to non-`[project]`
workspaces and PEP 723 scripts. It's not "breaking", but it will
invalidate lockfiles for non-`[project]` workspaces. I think that's
okay, since we consider those legacy right now, and they're really rare.
2024-12-24 17:32:29 -05:00
Charlie Marsh
3435777e87 Support uv export for non-project workspaces (#10144) 2024-12-24 15:23:28 +00:00
Charlie Marsh
ddde9481e3 Set glibc versions for standalone installers (#10142)
## Summary

Per Discord, it sounds like `cargo-dist` will assume that 2.31 is our
minimum glibc version, since we're building our own binaries. (You can
confirm this by looking at
[uv-installer.sh](https://github.com/astral-sh/uv/releases/download/0.5.11/uv-installer.sh).)

`cargo-dist` now supports specifying a glibc override for each target:
https://opensource.axo.dev/cargo-dist/book/reference/config.html#min-glibc-version.
This is great, since we use 2.17 everywhere, but 2.28 for ARM.
2024-12-24 08:35:28 -05:00
Charlie Marsh
f69f7610cc Update Cargo.lock (#10143)
## Summary

Must've been a bad rebase somewhere in Renovate?
2024-12-24 13:29:30 +00:00
Charlie Marsh
d1b1da5ac1 Upgrade cargo-dist to v0.27.0 (#10141)
## Summary

Required peer to https://github.com/astral-sh/uv/pull/10115.
2024-12-24 08:24:14 -05:00
renovate[bot]
7796a9cb3e Update Rust crate hyper to v1.5.2 (#10105) 2024-12-24 08:10:06 -05:00
renovate[bot]
5b3e54d9dd Update Rust crate axoupdater to 0.9.0 (#10115) 2024-12-24 08:09:13 -05:00
Charlie Marsh
473e274275 Rename requires-python validation method (#10133)
## Summary

I want to differentiate this from `validate_script_requires_python`.
2024-12-24 00:45:21 +00:00
Charlie Marsh
9279a125e9 Add a common abstraction to discover PEP 723 script interpreters (#10132)
## Summary

This logic is already repeated twice, and I'm on the verge of adding a
third.

(No behavioral changes.)
2024-12-24 00:29:37 +00:00
Charlie Marsh
6ed7302432 Move implementations next to definitions (#10131) 2024-12-23 19:16:48 -05:00
Mathieu Kniewallner
b24fb774b1 docs: fix invalid syntax in some sources examples (#10127)
## Summary

TOML 1.0 doesn't support multi-line for inline tables, so those examples
are invalid.
2024-12-23 16:12:45 -05:00
Charlie Marsh
755ca8efb5 Respect sources credentials in non-project workspaces (#10125)
## Summary

We weren't looking at credentials in the workspace root, for workspaces
in which the root _isn't_ a project.
2024-12-23 14:25:37 -05:00
Charlie Marsh
561103bf68 Remove redundant alias in uv init CLI (#10124) 2024-12-23 19:05:19 +00:00
Charlie Marsh
340e30d91e Include extras in uv-build Requires-Dist metadata (#10110)
## Summary

Closes https://github.com/astral-sh/uv/issues/10091.
2024-12-23 08:56:53 -05:00
renovate[bot]
c329623770 Update Rust crate thiserror to v2.0.9 (#10112) 2024-12-23 08:48:06 -05:00
renovate[bot]
9d417da4e1 Update astral-sh/setup-uv action to v5 (#10116) 2024-12-23 08:47:58 -05:00
renovate[bot]
df99d04b1d Update pre-commit dependencies (#10114) 2024-12-23 08:47:43 -05:00
renovate[bot]
4008e313bf Update Rust crate which to v7.0.1 (#10113) 2024-12-23 08:47:36 -05:00
renovate[bot]
dae551d8d8 Update documentation references to astral-sh/setup-uv to v5 (#10117) 2024-12-23 08:47:28 -05:00
renovate[bot]
54ab15121c Update Rust crate target-lexicon to v0.13.1 (#10111) 2024-12-23 01:45:06 +00:00
renovate[bot]
27ec53c736 Update Rust crate syn to v2.0.91 (#10109) 2024-12-23 01:34:43 +00:00
renovate[bot]
a31ec7aa16 Update Rust crate serde_json to v1.0.134 (#10108) 2024-12-23 01:33:50 +00:00
renovate[bot]
4945880270 Update Rust crate predicates to v3.1.3 (#10107) 2024-12-23 01:29:47 +00:00
renovate[bot]
1f97944c79 Update Rust crate platform-info to v2.0.5 (#10106) 2024-12-23 01:12:31 +00:00
renovate[bot]
ad156f393c Update Rust crate home to v0.5.11 (#10104) 2024-12-23 01:01:24 +00:00
renovate[bot]
18d8b79db1 Update Rust crate console to v0.15.10 (#10103) 2024-12-23 00:59:23 +00:00
renovate[bot]
9e33658ba9 Update Rust crate anyhow to v1.0.95 (#10102) 2024-12-23 00:49:18 +00:00
Charlie Marsh
d9008595d7 Rename 'Expected' and 'Actual' in lockfile logging (#10101)
## Summary

I can never remember which is which.
2024-12-22 20:42:42 +00:00
Charlie Marsh
0e836bcbbc Include both installed and request in satisfied logging (#10100) 2024-12-22 20:41:28 +00:00
Charlie Marsh
38a38fa8e2 Avoid erroring when subdirectories are provided in uv add (#10095)
## Summary

Closes https://github.com/astral-sh/uv/issues/10094.
2024-12-22 15:23:27 +00:00
Charlie Marsh
33cb3497aa Strip fragment when storing direct URL (#10093)
## Summary

Closes
https://github.com/astral-sh/uv/issues/10088#issuecomment-2558280467.
2024-12-22 09:07:04 -05:00
Charlie Marsh
ad92aaf186 Update PyTorch test to latest numpy (#10087) 2024-12-21 18:43:09 -05:00
Charlie Marsh
6e8114ae53 Update PyTorch test to latest jinja2 (#10084)
## Summary

This index doesn't include `exclude_newer`, unfortunately, so this
happens from time to time.
2024-12-21 21:01:10 +00:00
Charlie Marsh
8ff1dfd9b5 Add test cases for hash enforcement from existing uv.lock (#10081) 2024-12-21 09:53:38 -05:00
Charlie Marsh
705b3da913 Preserve sort when deciding on requirement placement (#10078)
## Summary

We had the right logic for determining whether the list is already
sorted, but we forgot to apply the same logic when deciding where to
insert the requirement, which made the list _unsorted_ for future
operations.

Closes https://github.com/astral-sh/uv/issues/10076.
2024-12-21 09:43:43 -05:00
Charlie Marsh
19a6b5fe4b Include hashes for local source archives (#10080)
## Summary

Closes https://github.com/astral-sh/uv/issues/10077
2024-12-21 09:31:28 -05:00