Commit Graph

3697 Commits

Author SHA1 Message Date
renovate[bot] 4cba45157e
Update pre-commit dependencies (#6631) 2024-08-26 00:26:00 +00:00
renovate[bot] a25f800aae
Update Rust crate syn to v2.0.76 (#6630) 2024-08-26 00:23:27 +00:00
renovate[bot] f8b8aa72ce
Update Rust crate serde_json to v1.0.127 (#6629) 2024-08-26 00:21:22 +00:00
renovate[bot] 8de12fd42e
Update Rust crate serde to v1.0.209 (#6628) 2024-08-26 00:21:07 +00:00
renovate[bot] d98d28a8ca
Update Rust crate rkyv to v0.7.45 (#6627) 2024-08-26 00:20:17 +00:00
renovate[bot] 413cf00a0c
Update Rust crate reqwest to v0.12.7 (#6626) 2024-08-26 00:15:15 +00:00
renovate[bot] 768840da49
Update Rust crate quote to v1.0.37 (#6625) 2024-08-26 00:14:55 +00:00
renovate[bot] faf534f997
Update Rust crate jiff to v0.1.10 (#6624) 2024-08-26 00:12:26 +00:00
renovate[bot] e4e1f384ce
Update Rust crate flate2 to v1.0.33 (#6623) 2024-08-25 20:12:14 -04:00
Charlie Marsh a72a09e9af
Use `tl` fork to support unquoted hrefs (#6622)
## Summary

Closes https://github.com/astral-sh/uv/issues/6082.
2024-08-26 00:02:26 +00:00
Jp 2bfc450418
Parses wheels WHEEL and METADATA files content as email messages (#6616)
## Summary

Fixes: #6615 
Currently, some packages are not installable with `uv`, like `ziglang`
on Linux.
Everything is described in the issue! 😄 

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

## Test Plan

<!-- How was it tested? -->
I added a unit test for the problematic use case.
I also checked that previous unit test are still running in order to
ensure the backward compatibility.
2024-08-25 18:31:07 -04:00
Charlie Marsh 069b021e0f
Update lockfile after setting minimum bounds in `uv add` (#6618)
## Summary

If we update the project requirements, we _also_ need to update the
lockfile.

Closes https://github.com/astral-sh/uv/issues/6614.
2024-08-25 21:04:25 +00:00
Charlie Marsh 1c580723c5
Support PEP 723 scripts in GUI files (#6611)
## Summary

Just an oversight.
2024-08-25 16:08:52 +00:00
Charlie Marsh 5076f325cd
Add `--refresh` to `tool run` warning for `--with` dependencies (#6609)
## Summary

Closes https://github.com/astral-sh/uv/issues/6576.
2024-08-25 11:15:41 -04:00
Charlie Marsh 5b3e654dc9
Show `--editable` on the `uv add` CLI (#6608)
## Summary

`false` is the default, so like other booleans, we should show the
non-default.
2024-08-25 15:01:39 +00:00
Charlie Marsh d0198abc10
Respect `--no-build-isolation-package` in `uv sync` (#6605)
## Summary

This was an oversight. The existing test was (correctly) failing, but
for the wrong reason (failing to build the package during _resolution_).
2024-08-25 14:15:13 +00:00
Charlie Marsh 4cbec958e1
Add FastAPI guide to overview (#6603) 2024-08-25 13:11:10 +00:00
Charlie Marsh 0dc74f619c
Remove `path-absolutize` dependency (#6589)
## Summary

This is now in the standard library.
2024-08-25 12:01:07 +00:00
Charlie Marsh 7fa265a11b
Use relative paths for `--find-links` and local registries (#6566)
## Summary

See: https://github.com/astral-sh/uv/issues/6458
2024-08-25 02:41:47 +00:00
Charlie Marsh 3902bb498d
Fix `lock_requires_python` fixture (#6594) 2024-08-24 18:45:03 -04:00
Charlie Marsh 31019ff140
Use logger interface for remaining audit messages (#6586) 2024-08-24 16:46:41 +00:00
Charlie Marsh 1fc45db082
Fix flaky HTTP redact test (#6583) 2024-08-24 13:49:29 +00:00
Charlie Marsh 8ee53a9e38
Clarify need to include `pyproject.toml` with `--no-install-project` (#6581)
## Summary

See: https://github.com/astral-sh/uv/issues/6573
2024-08-24 09:45:23 -04:00
Charlie Marsh 1eb97c91fd
Remove `FileLocation::Path` variant (#6577)
## Summary

This is redundant now that we support `file://` URLs.
2024-08-24 07:52:43 -04:00
Zanie Blue 2f94422484
Fix basic authentication tests to reflect proxy changes (#6569)
Updates the snapshot for the deployment from
https://github.com/astral-sh/pypi-proxy/pull/9 — for a while now, we've
only been failing on file requests not registry requests because the
proxy auth was setup wrong.
2024-08-24 05:59:14 +00:00
skykasko 8ca64de67e
Add example of reading script from stdin using echo (#6567)
As a non-shell-wizard, I was unfamiliar with the `EOF` syntax used in
the existing example (just above the one I added). I thought including
an example where the output of `echo` is piped to `uv run` might be more
accessible. As a bonus, it should work across more shells: the `EOF`
example doesn't work in fish because fish [doesn't support
heredocs](https://fishshell.com/docs/current/fish_for_bash_users.html#heredocs),
while the `echo` example does.

Feel free to ignore if unwanted.
2024-08-24 00:03:59 -05:00
Charlie Marsh f7835243c5
Only use relative paths in lockfile (#6490)
For users who were using absolute paths in the `pyproject.toml`
previously, this is a behavior change: We now convert all absolute paths
in `path` entries to relative paths. Since i assume that no-one relies
on absolute path in their lockfiles - they are intended to be portable -
I'm tagging this as a bugfix.

Closes https://github.com/astral-sh/uv/pull/6438
Fixes https://github.com/astral-sh/uv/issues/6371
2024-08-23 22:19:10 -04:00
Charlie Marsh 611a9003c9
Don't canonicalize paths to user requirements (#6560) 2024-08-24 02:02:14 +00:00
Charlie Marsh 44e36a7e69
Store test temporary directories outside of `/tmp` (#6559)
## Summary

There's a long comment inline describing the motivation here.
2024-08-24 01:51:32 +00:00
samypr100 a959772074
feat: use multi-runner on docker publish (#6556)
## Summary

This PR parallelizes multi-platform builds using multiple workers (hence
the new docker-build / docker-publish jobs), this seems to save about ~8
minutes.

This is partial work extracted from
https://github.com/astral-sh/uv/pull/6053 than is standalone
2024-08-23 18:50:46 -05:00
Zanie Blue deea6025a1
Bump version to 0.3.3 (#6558) 2024-08-23 18:35:55 -05:00
Charlie Marsh 3edf219882
Ignore errors in workspace discovery with `--no-project` (#6554)
## Summary

Closes https://github.com/astral-sh/uv/issues/6550.
2024-08-23 18:04:38 -05:00
Zanie Blue c46ef0c68d
Update transformers test case (#6557)
cc @BurntSushi I'm not sure why this changed
https://github.com/astral-sh/uv/actions/runs/10533336139/attempts/1?pr=6554
2024-08-23 18:04:27 -05:00
Zanie Blue f9348a6ea3
Run tests when `docs/reference` generated files change (#6551)
Short-term fix for https://github.com/astral-sh/uv/issues/6352
2024-08-23 17:35:53 -05:00
Zeyad Moustafa 2419760356
docs: made `uvx` note more explict (#6546)
<!--
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

I used `uvx` to test my code using `pytest` it was just before the
documentation and it worked pretty fine. But when I saw the docs I was
confused as it says:

> If you are running a tool in a project and the tool requires that your
project is installed, e.g., when using `pytest` or `mypy`, you'll want
to use `uv` run instead of `uvx`. Otherwise, the tool will be run in a
virtual environment that is isolated from your project.

So to make it simple if you don't recommend using `uvx` in this
situation then here is the pull request, and if not just close this pull
request. I said that I don't have to open an issue to discuss this as
it's so simple.

## Test Plan

None

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-23 17:17:37 -05:00
Charlie Marsh b149cbe634
Remove `--preview` from tests (#6536)
Closes https://github.com/astral-sh/uv/issues/6532.
2024-08-23 18:12:07 -04:00
Zanie Blue 60fc2e7234
Add uv tool install example in Docker (#6547) 2024-08-23 17:09:15 -05:00
Zanie Blue 6cf5d13183
Include virtual environment interpreters in `uv python find` (#6521)
Previously, we excluded these and only looked at system interpreters.
However, it makes sense for this to match the typical Python discovery
experience. We could consider swapping the default... I'm not sure what
makes more sense. If we change the default (as written now) — this could
arguably be a breaking change.
2024-08-23 21:06:57 +00:00
Zanie Blue d1cbcb30e3
Add `uv sync --no-install-package` to skip installation of specific packages (#6540)
Extends #6538 / #6539
See #4028

Allows excluding arbitrary packages from the sync.
2024-08-23 20:48:04 +00:00
Zanie Blue ca50243174
Add `uv sync --no-install-workspace` to skip installation of all workspace members (#6539)
Extends #6538
See #4028

Another version of https://github.com/astral-sh/uv/pull/6398
2024-08-23 20:39:33 +00:00
konsti 4e82db093a
Document why we do lower bounds (#6516)
Document in the resolution concept documentation why we add lower bounds

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-23 20:28:39 +00:00
Zanie Blue be1599ebf6
Add `uv sync --no-install-project` to skip installation of the project (#6538)
See #4028

A smaller version of https://github.com/astral-sh/uv/pull/6398

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-08-23 20:19:47 +00:00
Zanie Blue e0abab8259
Add documentation for `uv python find` (#6527)
In part, for https://github.com/astral-sh/uv/pull/6521
2024-08-23 15:14:52 -05:00
Zanie Blue 80b5384a4d
Set `VIRTUAL_ENV` for `uv run` invocations (#6543)
If we don't do this, and `uv run` invokes something like `uv run
--isolated uv pip install foo` uv won't mutate the isolated environment,
it'll mutate whatever outer environment it finds.
2024-08-23 20:03:38 +00:00
Charlie Marsh 9d1cd8e48c
Add `UV_COMPILE_BYTECODE` environment variable (#6530)
## Summary

Closes https://github.com/astral-sh/uv/issues/6493.
2024-08-23 18:05:32 +00:00
T-256 d0dda3798d
docs: Use proper environment variables for Windows (#6433)
ref: https://github.com/astral-sh/uv/issues/6397#issuecomment-2304512872
2024-08-23 13:04:08 -05:00
Thomas Quillan 429e6e61a8
Revert changes to pyproject.toml when sync fails duing `uv add` (#6526)
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
This is a attempt at fixing https://github.com/astral-sh/uv/issues/6486.
It reverts changes made to `pyproject.toml` when sync fails during `uv
add`. This solution felt a little heavy handed and could probably be
improved but it is what happens when locking fails during `uv add` so I
thought it would be a good start.

## Test Plan

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

I have added a test case for this to `tests/edit.rs`. It uses
`pytorch==1.0.2` to achieve the desired failure.
2024-08-23 13:54:33 -04:00
Ben Beasley 13da5b3cf5
Add license texts for contents of ecosystem/ (#6181)
<!--
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? -->
While the contents of `ecosystem/` are “merely” `pyproject.toml` files
and one trivial Python script, they are still covered by the licenses of
the projects from which they are copied. Not only is maintaining
license/copyright statements good practice, but it’s generally
specifically required by the particular licenses involved here.

Even though these files are for integration testing only – and therefore
do not contribute to the license of the compiled `uv` executable – they
are nevertheless part of the source archive, so distributors and
integrators need to consider their license status. For example, I
maintain the `uv` package in Fedora Linux, and I need to consider these
licenses because the files would be redistributed in the source RPMs.

## Test Plan

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

N/A – validated by examination of the diff.
2024-08-23 11:28:17 -05:00
Billy Doyle 3f147eeb06
doc: add stdin to guide (#6531)
<!--
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? -->
Document in guide stdin usage

alllll the easter eggs can do as well, but declined to keep consistent
with the other examples 😆

Additions to https://github.com/astral-sh/uv/pull/6481

```bash
$ uv run - <<EOF               
import antigravity
EOF
```

## Test Plan

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


https://github.com/astral-sh/uv/pull/6519#issuecomment-2307371063 new PR
2024-08-23 11:18:49 -05:00
Zanie Blue 4cdca06db2
Add `--no-project` alias for `uv python pin --no-workspace` (#6514)
This matches the other interfaces and seems like an oversight.
2024-08-23 16:08:27 +00:00