Commit Graph

6201 Commits

Author SHA1 Message Date
Charlie Marsh
94940e9221 Fix invalid 'kind' reference in flat index docs (#12583)
## Summary

Closes https://github.com/astral-sh/uv/issues/12576.
2025-03-31 13:22:35 +00:00
renovate[bot]
545ededdf6 Pin actions/checkout action to 11bd719 (#12567) 2025-03-31 09:07:40 -04:00
renovate[bot]
1d2d6aa1e4 Update Rust crate etcetera to 0.10.0 (#12575) 2025-03-31 09:07:33 -04:00
renovate[bot]
c08a1929a9 Update Rust crate either to v1.15.0 (#12574) 2025-03-31 09:07:21 -04:00
renovate[bot]
4acfa8dbef Update Rust crate codspeed-criterion-compat to v2.9.1 (#12573) 2025-03-31 09:07:06 -04:00
renovate[bot]
be615cb213 Update Artifact GitHub Actions dependencies (#12572) 2025-03-31 09:07:01 -04:00
renovate[bot]
37dc3cee28 Update Rust crate clap to v4.5.34 (#12571) 2025-03-31 09:06:55 -04:00
renovate[bot]
ae03d7e617 Update taiki-e/install-action digest to 6aca1cf (#12570) 2025-03-31 09:06:51 -04:00
renovate[bot]
123b9d7a5c Update actions/setup-python digest to 8d9ed9a (#12568) 2025-03-31 09:06:17 -04:00
Charlie Marsh
0632e24d15 Add UV_PROJECT to changelog (#12563) 0.6.11 2025-03-30 15:37:13 -04:00
Charlie Marsh
fe7fc323dd Bump version to v0.6.11 (#12535) 2025-03-30 15:35:42 -04:00
Nozomi R
ac2dcd658e Support UV_PROJECT environment to set project directory. (#12327)
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
Support the `UV_PROJECT` environment variable to set the project
directory.
#11946 

## Test Plan

<!-- How was it tested? -->
`cargo nextest run` passed except the cache_prune.
```
export UV_PROJECT=/path/to/project
uv sync
```
works.

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-03-30 15:12:02 -04:00
Charlie Marsh
56914c9c60 Use Entry API in lockfile-to-requirements.txt construction (#12561) 2025-03-30 18:49:36 +00:00
Charlie Marsh
2a28dacf28 Respect transitive dependencies in uv tree --only-group (#12560)
## Summary

The overall strategy here is to make this code look more like
`requirements_txt.rs`: we seed the root members, then perform a DFS.
Previously, we created all nodes upfront, which caused problems when
using `--only-group`, since we'd omit "production" dependencies of
development dependencies.

Closes https://github.com/astral-sh/uv/issues/12526.
2025-03-30 14:48:47 -04:00
ndrew222
4554ebbd53 changed where the fish completions get installed to where fish docs recommend (#12551)
## Summary
I only changed the location of where the fish completions get sent, from
`~/.config/fish/config.fish` to `~/.config/fish/completions/uv.fish` and
`~/.config/fish/completions/uvx.fish` respectively

## Test Plan
I have tested and putting the completions in those paths works fine and
complies with the fish docs. Also keeps your `config.fish` clean


### edit:
refer to
https://fishshell.com/docs/current/completions.html#where-to-put-completions
> This wide search may be confusing. If you are unsure, your completions
probably belong in `~/.config/fish/completions`.
2025-03-30 11:47:01 -04:00
johnthagen
57c57d1011 Fix statement in Required environments docs (#12540)
## Summary

The beginning of the sentence says that the package only publishes
distributions for Linux, so it will only be installable on Linux.
2025-03-28 20:36:59 -04:00
Zohar Meir
ab3bab1421 Add dependents ("via ..." comments) in export command (#12350)
Adding dependency trace/parent comments ("via ...") to the export
command output.
This is a similar behavior to the pip compile output.

#### Note to the eager reviewer:
First of all - thanks!  
Secondly, this is still a very rough draft. These are the first lines of
code I've ever written in Rust. This is still mostly an educational/fun
exercise for myself. If opening a Draft PR is creating too much noise -
I apologize and I will close it until it is ready.

## Summary

Resolves #7777

## Test Plan

- [X] manual command execution
- [x] update expected output in tests

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-03-28 10:37:53 -04:00
konsti
2d8c8071cb Remove dummy file (#12530) 2025-03-28 14:28:40 +00:00
Charlie Marsh
c6fb1216ff Avoid writing empty requires-python to script blocks (#12517)
## Summary

I don't know if we ever do this in practice, but we _do_ do it in tests.
2025-03-28 10:26:51 -04:00
Charlie Marsh
175017bf51 Bump least-recent non-EOL macOS version to 13.0 (#12518)
## Summary

We use the least-recent non-EOL macOS version by default, and this has
since changed (i.e., macOS 12 went EOL).

Closes https://github.com/astral-sh/uv/issues/12487.
2025-03-28 07:49:45 -04:00
Merlin
5b2a8abef9 Add a newline after metadata when initializing scripts with other metadata blocks (#12501)
## Summary

uv doesn't separate the metadata block from other blocks when adding the
`script` block to a script, which results in the next block being
considered part of the script block and causes errors when running.

See #12499 for more details.

Closes #12499

## Test Plan

I manually tested the most common scenario, but there's a few edge cases
that would be good to have tests for.

I would have written the tests also, but I was running into errors like
this:
```bash
$ cargo test --package uv-scripts
   Compiling uv-configuration v0.0.1 (/home/merlin/Projects/uv/crates/uv-configuration)
error: cannot find attribute `value` in this scope
 --> crates/uv-configuration/src/project_build_backend.rs:8:38
  |
8 |     #[cfg_attr(feature = "schemars", value(hide = true))]
  |                                      ^^^^^

error: could not compile `uv-configuration` (lib) due to 1 previous error
```

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-03-27 21:39:29 +00:00
Charlie Marsh
9e10f83ce7 Respect build constraints in uv sync (#12502)
## Summary

There are still a few missing sites that we need to audit:

- `uv tool install` (https://github.com/astral-sh/uv/issues/12496)
- `uv tool run` (https://github.com/astral-sh/uv/issues/12496)
- The `--with` dependencies in `uv run --with`
(https://github.com/astral-sh/uv/issues/12505)

Closes #12441.
2025-03-27 17:11:50 -04:00
Charlie Marsh
50cf7d19b0 Use a boxed slice for various requirement types (#12514)
## Summary

Sorry I had five mins in between things.
2025-03-27 17:09:26 -04:00
Zanie Blue
daeae612aa Add --version to smoke tests (#12516) 2025-03-27 20:45:25 +00:00
Zanie Blue
a28db37f33 Add smoke test script in Python (#11628)
I wanted to consolidate these anyway, and apparently it's a huge pain to
make a Windows task fail early via GitHub's PowerShell setup so I
implement this in Python instead.
2025-03-27 15:35:21 -05:00
Zanie Blue
6a13e4cedd Bump pinned Python versions (#12515)
Moves us to the latest patch for our test Python versions.
2025-03-27 20:16:10 +00:00
Charlie Marsh
7cb85fa08f Remove TODOs around caching workspace discovery (#12510)
## Summary

This happened!
2025-03-27 16:25:09 +00:00
John Mumm
882e2f9d3f Improve trace message in auth middleware (#12497)
Updated trace message to be clearer.
2025-03-27 15:10:02 +01:00
Charlie Marsh
82de40c2da Enable necessary optional features in uv-settings (#12504)
## Summary

We tend not to run tests for individual crates, which can lead to weird
situations like this, where crates are missing optional features that
are otherwise installed globally.

## Test Plan

Run `cargo test --profile fast-build -p uv-scripts`, which otherwise
fails to compile.
2025-03-27 02:30:00 +00:00
Charlie Marsh
6e03adc956 Fix schemars macro usage in build backend enum (#12503)
## Test Plan

```
cargo test --profile fast-build -p uv-scripts
```
2025-03-27 02:23:21 +00:00
Aria Desires
6c57c90ed3 distinguish -q and -qq (#12300)
The idea here is that we introduce a new stdout_important method for
things that want to care about the difference between "quiet" and
"silent".

This PR is WIP because it has no actual uses of stdout_important, and we
should have at least one before landing this. Perhaps someone has a
suggestion for commands that would really benefit from this distinction?

Fixes #10431
2025-03-26 16:46:16 -04:00
Charlie Marsh
bd9c365b92 Support --find-links-style "flat" indexes in [[tool.uv.index]] (#12407)
## Summary

This PR extends `[[tool.uv.index]]` to support `--find-links`-style
"flat" indexes, so that users can point to such indexes without using
`--find-links` _and_ get access to the full functionality of
`[[tool.uv.index]]` (e.g., they can now pin packages to
`--find-links`-style indexes).

Note that, at present, `--find-links` indexes actually have some quirky
behavior, in that we combine them into a single entity and then merge
the discovered distributions into each Simple API-style index. The
motivation here, IIRC, was to match pip's behavior quite closely. I'm
interested in _removing_ that behavior, but it'd be breaking (and may
also be inconvenient for some use-cases). So, the behavior for indexes
passed in via `--find-links` remains completely unchanged. However,
`[[tool.uv.index]]` entries with `format = "flat"` are now treated
identically to those defined with `format = "simple"` (the default), in
that we stop after we find the first-matching index, etc.

Closes https://github.com/astral-sh/uv/issues/11634.
2025-03-25 21:14:44 -04:00
Charlie Marsh
f2a2d982b8 Bump version to v0.6.10 (#12430) 0.6.10 2025-03-25 20:43:41 -04:00
Charlie Marsh
e4c98e976f Use Box<Path> in lieu of PathBuf for immutable structs (#12346)
## Summary

I don't know if I actually want to commit this, but I did it on the
plane last time and just polished it off (got it to compile) while
waiting to board.
2025-03-25 21:56:06 +00:00
John Mumm
9745b76357 Add auth policy support for pip commands (#12470)
We were not applying the `authenticate = "always"` behavior to `uv pip`
commands (related to #12362). This PR addresses that, applying
authentication policies wherever we set up a registry client.
2025-03-25 17:13:42 -04:00
konsti
99e2324dcf Use 64-bit host for 32-bit releases to work around OOM (#12466)
The i686 linux gnu release job started failing since the last release
(#12430) due to an OOM with llvm breaking the 4GB limit for 32-bit
processes. We work around this by using a 64-bit host targeting 32-bit.
2025-03-25 18:33:31 +01:00
renovate[bot]
c2eb32164d Update Rust crate windows-registry to v0.5.1 (#12419) 2025-03-25 01:56:42 +00:00
renovate[bot]
c5b6a0849e Update Rust crate boxcar to v0.2.11 (#12414) 2025-03-25 01:56:07 +00:00
renovate[bot]
78b6c5e571 Update Rust crate backon to v1.4.1 (#12413) 2025-03-25 01:50:35 +00:00
Charlie Marsh
ddbf90c906 Revert "Show a dedicated hint for setuptools dash-separator change" (#12453)
Reverts astral-sh/uv#12438
2025-03-24 19:09:26 -04:00
Shlomo
20e7dcd366 docs: update dependency-bots.md (#12454)
https://github.com/renovatebot/renovate/issues/30909 has already been
resolved and released
2025-03-24 19:08:58 -04:00
Charlie Marsh
664c77a6e1 Show a dedicated hint for setuptools dash-separator change (#12438)
## Summary

See: https://github.com/astral-sh/uv/issues/12434.

## Test Plan

The error in-context:

![Screenshot 2025-03-24 at 12 10
11 PM](https://github.com/user-attachments/assets/48885d71-4222-4364-987f-65a4b776d91f)
2025-03-24 16:37:39 +00:00
Nick Janetakis
113ae87ab4 Update --prune help arg from PRUNE to PACKAGE (#12432)
## Summary

This fixes https://github.com/astral-sh/uv/issues/12426 which helps use
a more accurate arg name in the help output.

## Test Plan

I didn't test it locally, @charliermarsh gave me guidance on what to
change so I looked around that file for another example of `value_name`
and repeated what I saw. I kept it formatted to 1 line based on it not
being a long line. The other example of `value_name` had everything on
separate lines because there were a bunch of parameters passed in.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-03-24 15:45:29 +00:00
Charlie Marsh
1865e0a6ee Pass around index with associated metadata (#12406)
## Summary

This PR modifies the requirement source entities to store a (new)
container struct that wraps `IndexUrl`. This will allow us to store
user-defined metadata alongside `IndexUrl`, and propagate that metadata
throughout resolution.

Specifically, I need to store the "kind" of the index (Simple API vs.
`--find-links`), but I also ran into this problem when I tried to add
support for overriding `Cache-Control` headers on a per-index basis: at
present, we have no way to passing around metadata alongside an
`IndexUrl`.
2025-03-24 10:15:49 -04:00
renovate[bot]
c3442e822e Update Rust crate jiff to v0.2.5 (#12415) 2025-03-24 10:15:03 -04:00
renovate[bot]
f00f8e908a Update taiki-e/install-action digest to 914ac1e (#12410) 2025-03-24 09:19:26 -04:00
renovate[bot]
2040c1c330 Update webfactory/ssh-agent action to v0.9.1 (#12421) 2025-03-24 09:19:07 -04:00
renovate[bot]
5ac62e05c5 Update Rust crate reflink-copy to v0.1.26 (#12418) 2025-03-24 09:18:36 -04:00
renovate[bot]
ecbf288e6b Update Rust crate mimalloc to v0.1.44 (#12416) 2025-03-24 09:18:26 -04:00
renovate[bot]
7c57cefaa8 Update Rust crate astral-tokio-tar to v0.5.2 (#12412) 2025-03-24 02:16:43 +00:00