Commit Graph

5911 Commits

Author SHA1 Message Date
micolous 52870c587c
Fix incorrect error message when specifying `tool.uv.sources.(package).workspace` with other options (#11013)
## Summary

When a `pyproject.toml` `[tool.uv.sources.(package)]` section specifies
`workspace` and one or more of (`index`, `git`, `url`, `path`, `rev`,
`tag`, `branch`, `editable`), running `uv` to build or sync the package
gives the error:

```
cannot specify both `index` and `(parameter name)`
```

The error should actually say:

```
cannot specify both `workspace` and `(parameter name)`
```

## Test Plan

I ran `cargo test`, and all tests still passed.
2025-01-28 09:25:33 -05:00
Aria Desires a2db48d649
fix async windows file persist retries (#11008)
The previous two versions of the code were bugged and would always
produce None when you retried (producing a hard LostState error).
2025-01-27 18:51:36 -05:00
konsti c1a2ef12d2
Respect `--no-sources` for `uv pip install` workspace discovery (#11003) 2025-01-28 00:10:27 +01:00
Charlie Marsh bbba2c7bce
Remove unnecessary distribution clone (#11004) 2025-01-27 18:07:13 -05:00
konsti bd9607bbf9
Properly format test publish error (#11001) 2025-01-27 21:03:21 +01:00
Charlie Marsh a00f6f5d3d
Reject `--editable` flag on non-directory requirements (#10994)
## Summary

Closes https://github.com/astral-sh/uv/issues/10992.
2025-01-27 19:37:23 +00:00
Zanie Blue 71f0798536
Add a troubleshooting section and reproducible example guide (#10947)
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
2025-01-27 13:29:23 -06:00
Cédric 315fc1792a
Update documentation for activating virtual environments in different shell (#11000)
## Add activation commands for fish shell and other alternative shells

While trying to use uv with fish shell, I encountered an issue as
`source .venv/bin/activate` didn't work. The documentation didn't
specify that fish shell requires using `source .venv/bin/activate.fish`
instead. I created issue #10986 to address this.

This PR improves the documentation by:
- Adding the correct activation command for fish shell: `source
.venv/bin/activate.fish`
- Adding the correct activation command for Nushell: `use
.venv\Scripts\activate.nu`
- Adding the correct activation command for Tcsh: `use
.venv/bin/activate.csh`

This will help users of alternative shells to properly activate their
virtual environments without encountering the same confusion I
experienced.

Fixes #10986

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-27 19:24:47 +00:00
konsti 3c6aee30fc
Improve publish test script resilience (#10984) 2025-01-27 20:20:33 +01:00
Charlie Marsh c88a4baaac
Update `compile_enumerate_no_versions ` snapshot (#10998)
## Summary

I think the "available versions" may not filter on `--exclude-newer`,
since it's marked as an incompatibility? In which case, this error
message can change as versions are published.
2025-01-27 14:18:15 -05:00
Charlie Marsh f1c02182b7
Reference workspaces in `--no-sources` documentation (#10995)
## Summary

See:
https://github.com/astral-sh/uv/issues/10991#issuecomment-2616543018
2025-01-27 13:33:14 -05:00
Ryan 90a4178c7a
[docs/integration/docker] add sha pinning tip (#10955)
<!--
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? -->

As requested in https://github.com/astral-sh/uv/issues/6565, this adds a
tip discussing the ability to pin the image to a specific SHA digest and
why it may be useful.

## Test Plan

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

Start serving the documentation locally

```shell
uvx --with-requirements docs/requirements.txt -- mkdocs serve -f mkdocs.public.yml
```

Then navigate to http://127.0.0.1:8000/uv/guides/integration/docker/ to
see the tool tip being rendered properly

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-27 18:29:23 +00:00
Zanie Blue e8d50153d0
Update name of "Build binary" job to highlight that these are the "release" binaries (#10990)
I found this confusing since we have `build binary` jobs in regular CI
2025-01-27 11:48:38 -06:00
konsti ad60f8da77
Use install action for cargo shear (#10983) 2025-01-27 18:06:17 +01: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] b80ba9bca7
Update pre-commit hook astral-sh/ruff-pre-commit to v0.9.3 (#10975) 2025-01-27 02:33:35 +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
Charlie Marsh 86ec6c86dd
Prefer preferences with greater package versions (#10963)
## Summary

Closes https://github.com/astral-sh/uv/issues/10957.
2025-01-25 16:37:25 -05:00
Paul e8d6b330a3
tiny typo (duplicate word) (#10959)
Fix an apparent typo
2025-01-25 10:30:10 -06:00
Charlie Marsh a681905e12
Allow optional `=` for editables in `requirements.txt` (#10954)
## Summary

We allow this for all other argument flags; seems like an oversight.

Closes https://github.com/astral-sh/uv/issues/10941.
2025-01-24 21:55:51 -05:00
Zanie Blue 1ef47aa1d5
Only move the `.cargo` directory if it exists (#10938)
which it usually does... but on some runners it can be missing now?
2025-01-24 15:39:29 +00:00
Zanie Blue eeab865194
Update `riscv64` Python downloads to allow install on `riscv64gc` (#10937)
Closes https://github.com/astral-sh/uv/issues/10883
2025-01-24 09:33:29 -06:00
Zanie Blue 98e7cd00c8
Add Windows aarch64 to the release binaries (#10885)
Following test coverage from #10540 
Closes https://github.com/astral-sh/uv/issues/1141
2025-01-24 09:24:22 -06:00
konsti f645499dbd
Child exit with signal n returns 128+n (#10781) 2025-01-24 16:20:32 +01:00
Zanie Blue 0008ec69c4
Run multiple commands in ecosystem tests (#10920) 2025-01-24 09:18:21 -06:00
吴小白 57a2740d90
Allow installation of manylinux wheels on loongarch64 (#10927) 2025-01-24 14:36:03 +01:00
Zanie Blue 6e4845fffb
Add documentation for `uv add -r` (#10926)
Closes https://github.com/astral-sh/uv/issues/10924
2025-01-23 21:34:50 -06:00
Zanie Blue 42fae925c4
Bump version to 0.5.24 (#10922) 2025-01-23 17:26:59 -06:00
Zanie Blue 9a2d5fd358
Add ecosystem test case for `pydantic/pydantic-core` (#10917) 2025-01-23 17:05:13 -06:00
Zanie Blue cbf6d5af9e
Allow fallback to Python download on non-critical discovery errors (#10908)
Closes https://github.com/astral-sh/uv/issues/10898

In #10716, I broke fallback to downloading Python versions by throwing a
different error kind.
2025-01-23 22:37:02 +00:00
Zanie Blue 2a0fa8a8ee
Add test case for automatic installs (#10913) 2025-01-23 22:21:21 +00:00
Zanie Blue 10654cb8c2
Fix render of matrix arch for system conda tests (#10914) 2025-01-23 21:31:59 +00:00
Zanie Blue fd5131cb7c
Require tests to opt-in to managed Python installation (#10912)
First of all, I want to test automatic managed installs (see #10913) and
need to set that up. Second of all, some tests were _implicitly_
downloading interpreters instead of using the one from their context —
which is unexpected and naughty and very slow.
2025-01-23 15:24:40 -06:00
Zanie Blue a05b0e0346
Separate musl and libc linux builds in CI (#10830)
We have a lot of jobs downstream of the `build-binary-linux` job, but
the job is significantly slower than the other binary builds because we
need to configure musl. Instead, we split this into two jobs (as it was
before https://github.com/astral-sh/uv/pull/2309#discussion_r1520101330)
to speed things up.

The libc job takes ~1m and its _downstream_ jobs finish before the musl
build does. The musl job takes ~5m.
2025-01-23 15:19:26 -06:00
Aria Desires c05aca61db
temporarily disable new uv pip dependency-group flags (#10909)
We'll probably end up shipping but we were moving ahead with this on the
basis that pip may not even ship this, so let's play it safe and wait
for a bit.
2025-01-23 14:43:07 -06:00
Aria Desires 86f2f16d05
make test filter permissive of bdist.win32 (#10911)
I swear a few days ago there were way more of this filter but now
there's only one so *shrug*.
2025-01-23 14:13:00 -05:00
Zanie Blue 0f1987b8ed
Update `overlapping_resolution_markers` (#10910)
Updating the snapshot to unblock `main`, but this needs to be
deterministic or it will break downstream packagers too.
2025-01-23 18:29:01 +00:00
Zanie Blue bf700f8b10
Add test coverage for `uv pip install <dir> --group <name>` (#10907) 2025-01-23 11:43:38 -06:00
Zanie Blue f303c4abe0
Fix test snapshot for `--only-group` changes (#10906) 2025-01-23 17:24:59 +00:00
konsti 349c0b6fc8
Disable the progress bar with `RUST_LOG` (#10901) 2025-01-23 18:03:15 +01:00
Zanie Blue 26210cc0e6
Bump cargo-dist version to 0.28.0 (#10884)
Some installer improvements; see
https://github.com/axodotdev/cargo-dist/blob/main/CHANGELOG.md#version-0280-2025-01-08
2025-01-23 10:49:53 -06:00
Zanie Blue 61556fe7ae
Add a `uv pip install --group` test case with `default-groups` (#10899) 2025-01-23 10:44:32 -06:00
Aria Desires 214494149c
fix `--only-group` in `uv pip` interface (#10902)
This was an oversight in the implementation, thankfully it appears to be
a simple fix? (My only hesitation is this implementation essentially
claims that --only-group is defacto incompatible with --extra and I
*think* that's the case but I'm not certain.)
2025-01-23 11:35:47 -05:00
konsti 8ce0736f9e
All (virtual) packages must have a priority (#10853)
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-01-23 16:09:47 +00:00
Zanie Blue a0620bcf92
Add test coverage for use of `git` without feature flag (#10874)
Shoves a broken `git` executable onto the front of the `PATH` in the
test context when the `git` feature is disabled so they fail if they're
missing the feature-gate.
2025-01-23 09:55:06 -06:00
Charlie Marsh b2dac9979d
Use Hashbrown's raw entry API to reduce hashes and clone in priority (#10881)
## Summary

I'm open to not merging this -- I was kind of just interested in what
the API looked like. But the idea is: we can avoid hashing values twice
and unnecessarily cloning within the priority map by using the raw entry
API.
2025-01-23 09:34:37 -05:00