4291 Commits

Author SHA1 Message Date
Zanie Blue
0e1b25a536 Bump version to 0.4.20 (#8016) 0.4.20 2024-10-08 19:55:21 +00:00
Kemal Akkoyun
1a39ffe391 uv run: List available scripts when a script is not specified (#7687)
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
## Summary

This PR adds the ability to list available scripts in the environment
when `uv run` is invoked without any arguments.
It somewhat mimics the behavior of `rye run` command
(See https://rye.astral.sh/guide/commands/run).

This is an attempt to fix #4024.

## Test Plan

I added test cases. The CI pipeline should pass.

### Manuel Tests

```shell
❯ uv run
Provide a command or script to invoke with `uv run <command>` or `uv run script.py`.

The following scripts are available:

normalizer
python
python3
python3.12

See `uv run --help` for more information.
```

---------

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-10-08 19:34:50 +00:00
konsti
282fab5f70 Hint at wrong endpoint in publish (#7872)
Improve hints when using the simple index URL instead of the upload URL
in `uv publish`. This is the most common confusion when publishing, so
we give it some extra care and put it more centrally in the CLI help.

Fixes #7860

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-10-08 19:16:02 +00:00
Jo
9e98055a9e Add snapshot testing to contribution guide (#7882)
## Summary

Add a `Snapshot testing` section to `CONTRIBUTING.md`.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-10-08 19:08:25 +00:00
Jo
15e5e3f6af Fill in authors filed during uv init (#7756)
## Summary

Fill in the `authors` field of `pyproject.toml` by fetching author info
from Git.

Resolves #7718
2024-10-08 14:06:37 -05:00
sobolevn
56521937b7 Add shellcheck CI (#7888)
<!--
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 started learning `uv` by inspecting the source code.
I've noticed that your shell scripts are very good! Which is rare!

## Test Plan

I propose to add `shellcheck` to the CI.
It is a great tool to help finding bugs and style issues in shell code.

Techincal details:
- This CI job will only run when any `.sh` files are changed (or the job
definition file)
- It takes just several seconds even on local machine:
```
» time shellcheck -S style **/*.sh
shellcheck -S style **/*.sh  0.02s user 0.05s system 61% cpu 0.123 total
```

- It is easy to use, for example: I just fixed the single problem you
had in your code with `# shellcheck disable=SC1091`
- I am using this tool for around 8 years now and didn't have any
issues. Examples:
ca899f3b69/.github/workflows/test.yml (L22-L27)
and
https://github.com/wemake-services/wemake-django-template/blob/master/.github/workflows/shellcheck.yml

But, I understand that build / lint tools are very subjective. So, feel
free to close :)
2024-10-08 13:58:00 -05:00
Zanie Blue
cd582cacab Fix GitHub Actions integration test (#8013)
Fixes bug noted in https://github.com/astral-sh/uv/pull/8012

GitHub upgraded the 3.12 Python version so the path changed!
2024-10-08 17:53:56 +00:00
Zanie Blue
f6fd849f2c Add managed downloads for CPython 3.13.0 final (#8010) 2024-10-08 12:53:09 -05:00
konsti
b5dbc32aee Check consistency between prepare and build step (#7986) 2024-10-08 16:38:22 +00:00
konsti
9ae6c4fce7 Build backend: Logging and more checks (#7980) 2024-10-08 15:25:40 +00:00
konsti
1d6e1bd5b4 Fix merge problem with main (#8005) 2024-10-08 17:16:08 +02:00
Sigurd Spieckermann
b70405c59a Use simple image syntax in GitLab integration docs 2024-10-08 09:48:00 -05:00
Sigurd Spieckermann
cae9507bda Use more idiomatic CI job names in GitLab integration docs 2024-10-08 09:48:00 -05:00
Sigurd Spieckermann
427c1f7fb2 Fix cache directory path in GitLab integration docs 2024-10-08 09:48:00 -05:00
Sigurd Spieckermann
4e4a558d64 Remove obsolete command in GitLab integration docs 2024-10-08 09:48:00 -05:00
Sigurd Spieckermann
b5c52b205a Use idiomatic syntax in GitLab integration docs 2024-10-08 09:48:00 -05:00
Sigurd Spieckermann
eb5af72a6d Fix syntax in GitLab integration docs 2024-10-08 09:48:00 -05:00
konsti
025ec02326 Fix problems with build backend metadata files (#7979) 2024-10-08 16:21:36 +02:00
renovate[bot]
fa4ac3d2bd Update Rust crate boxcar to v0.2.6 (#7951)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [boxcar](https://redirect.github.com/ibraheemdev/boxcar) |
workspace.dependencies | patch | `0.2.5` -> `0.2.6` |

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-08 03:36:44 -04:00
Zanie Blue
a451fb6858 Bump version to 0.4.19 (#7991) 0.4.19 2024-10-07 17:32:37 -05:00
Zanie Blue
46ff220508 Remove PythonPreference toggle based on UV_TEST_PYTHON_PATH (#7989)
Needed for https://github.com/astral-sh/uv/pull/7934

This is some legacy logic, I think.
2024-10-07 21:13:19 +00:00
Zanie Blue
38beb2b24f Show verbose output during integration tests (#7982) 2024-10-07 18:39:22 +00:00
Zanie Blue
0176b6f0bb Show verbose logs during smoke test (#7984) 2024-10-07 13:28:54 -05:00
renovate[bot]
a3e21d61e3 Update Rust crate futures to v0.3.31 (#7953) 2024-10-07 17:59:22 +00:00
Zanie Blue
e479e8b4b3 Show interpreter source during Python discovery query errors (#7928)
Closes https://github.com/astral-sh/uv/issues/4154

e.g.

```
❯ UV_PYTHON=/dev/null cargo run -q -- pip install anyio
error: Failed to inspect Python interpreter from provided path at `/dev/null` 
  Caused by: Failed to query Python interpreter at `/dev/null`
  Caused by: Permission denied (os error 13)
  
❯ VIRTUAL_ENV=/dev/null cargo run -q -- pip install anyio
error: Failed to inspect Python interpreter from active virtual environment at `/dev/null/bin/python3` 
  Caused by: Failed to query Python interpreter
  Caused by: failed to canonicalize path `/dev/null/bin/python3`
  Caused by: Not a directory (os error 20)
```
2024-10-07 12:57:18 -05:00
renovate[bot]
719604ae1d Update pre-commit dependencies (#7955) 2024-10-07 17:55:10 +00:00
renovate[bot]
48792bf3af Update Rust crate async-compression to v0.4.13 (#7950) 2024-10-07 12:52:14 -05:00
renovate[bot]
6dc06fae67 Update Rust crate clap to v4.5.19 (#7952) 2024-10-07 12:50:35 -05:00
renovate[bot]
af32e04fd8 Update Rust crate reqwest to v0.12.8 (#7954) 2024-10-07 12:50:14 -05:00
renovate[bot]
0f691f21f4 Update Rust crate indexmap to v2.6.0 (#7956) 2024-10-07 12:49:54 -05:00
Zanie Blue
a4f64d2be6 Bump patch Python versions for project (#7972) 2024-10-07 12:38:12 -05:00
konsti
ceafa476c7 Basic functional build backend wheels (#7966) 2024-10-07 19:30:52 +02:00
Zanie Blue
7d883fc12f Add 3.13 support to the platform reference (#7971) 2024-10-07 12:06:43 -05:00
Zanie Blue
c69b808e43 Fix parsing of gnueabi libc variants in Python version requests (#7975)
```
❯ cargo run -q -- python install cpython-3.12.6-linux-armv7-gnueabihf
Searching for Python versions matching: cpython-3.12.6-linux-armv7-gnueabihf
Installed Python 3.12.6 in 2.10s
 + cpython-3.12.6-linux-armv7-gnueabihf

❯ uv python install cpython-3.12.6-linux-armv7-gnueabihf
error: Cannot download managed Python for request: executable name `cpython-3.12.6-linux-armv7-gnueabihf`
```
2024-10-07 15:49:21 +00:00
Zanie Blue
3fce2f3733 Add Python 3.13 classifier (#7948)
ref https://pyreadiness.org/3.13/
2024-10-07 09:31:39 -05:00
konsti
5d789c6af7 Implement build backend metadata (#7961) 2024-10-07 10:51:45 +02:00
konsti
92538ada7c Metadata transformation for the build backend (#7781) 2024-10-07 10:38:40 +02:00
Zanie Blue
37b73230d3 Allow self-depedencies in the dev section (#7943)
https://github.com/astral-sh/uv/pull/7766 banned using `uv add` to
create self-dependencies in the `dev` section which breaks `uv add --dev
.[extra]` which is a fair use-case for adding a self-dependency.

Maybe we should only allow this if the added requirement includes an
extra group? Otherwise it's a bit weird.
2024-10-06 14:42:56 +00:00
Zanie Blue
80e76f6f63 Add failing uv add --dev self-reference test (#7942)
Test case for https://github.com/astral-sh/uv/pull/7943
2024-10-06 09:33:53 -05:00
FishAlchemist
101feff7cb Clearly specify the minimum supported Windows Server version in the document (#7946)
## Summary
https://doc.rust-lang.org/1.81.0/rustc/platform-support.html

![image](https://github.com/user-attachments/assets/f3921374-5f49-4f89-99d8-4808d94b4647)

This is actually part of the change in minimum Windows version
requirements in Rust 1.78.0, but subsequent versions of the
documentation clearly specify the minimum version of Windows Server.
https://github.com/rust-lang/rust/pull/126034

## Test Plan
Run the document server locally.

![image](https://github.com/user-attachments/assets/94f6bbd0-7aa6-4a47-aee2-d6f9ee35d5e5)
2024-10-06 09:33:19 -05:00
Eduardo Mendes
561655b51f fix uninstallation command for windows on documentation (#7944)
## Summary

Fix uninstall uv command for windows on documentation
2024-10-06 09:29:17 -05:00
Zanie Blue
ab80bf5f10 Clarify project environment creation a little (#7941)
Closes https://github.com/astral-sh/uv/issues/7940
2024-10-05 15:02:04 +00:00
konsti
79555f3e67 Remove dead Sha256Reader (#7929)
It seems that this code is never used.
2024-10-04 15:25:52 -05:00
Zanie Blue
247f66249e Ignore UV_CACHE_DIR during tests (#7927)
Exploring an alternative to https://github.com/astral-sh/uv/pull/7895
2024-10-04 15:12:05 +00:00
sobolevn
ff1a896dd0 Ignore UV_CACHE_DIR in help tests (#7895) 2024-10-04 09:41:25 -05:00
konsti
ad638d7fa3 Use a higher timeout for publishing (#7923) 2024-10-04 15:52:23 +02:00
Krishnan Chandra
d73b25385f Coerce empty string values to None for UV_PYTHON env var (#7878)
## Summary

Closes #7841. If there are other env vars that would also benefit from
this value parser, please let me know and I can add them to this PR.

## Test Plan

When running the same example from the linked issue, it now works:

```
UV_PYTHON= cargo run -- init x
   Compiling ...
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 29.06s
     Running `target/debug/uv init x`
Initialized project `x` at `/Users/krishnanchandra/Projects/uv/x`
```
2024-10-04 12:32:03 +01:00
Seth Morton
c591636dbe Add UV_FIND_LINKS environment variable support for the --find-links command-line option (#7912)
## Summary

This PR adds support for the `UV_FIND_LINKS` environment variable as an
alternative to the `--find-links` command-line option, as requested in
#1839.

## Test Plan

A unit test was added to validate that setting `UV_FIND_LINKS` provided
the same result as a link provided with the `--find-links` command-line
option.

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-10-04 11:30:49 +00:00
konsti
fc495876cf Clear publish progress bar on retry (#7921) 2024-10-04 13:15:26 +02:00
Charlie Marsh
d80139698d Trim commits when reading from Git refs (#7922)
## Summary

Closes #7919.
2024-10-04 11:10:53 +00:00