From 83f835b0d04b5cbaf580377a4c0b76a4343be849 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 17 Oct 2024 09:26:39 -0500 Subject: [PATCH] Bump version to 0.4.23 (#8275) Co-authored-by: Charlie Marsh --- CHANGELOG.md | 85 +++++++++++++++++++++++++++ Cargo.lock | 4 +- crates/uv-version/Cargo.toml | 2 +- crates/uv/Cargo.toml | 2 +- docs/guides/integration/docker.md | 8 +-- docs/guides/integration/github.md | 2 +- docs/guides/integration/pre-commit.md | 6 +- pyproject.toml | 2 +- 8 files changed, 98 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6997dfba5ad..571b34c18f28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,90 @@ # Changelog +## 0.4.23 + +This release introduces a revamped system for defining package indexes, as an alternative to the existing pip-style +`--index-url` and `--extra-index-url` configuration options. + +You can now define named indexes in your `pyproject.toml` file using the `[[tool.uv.index]]` table: + +```toml +[[tool.uv.index]] +name = "pytorch" +url = "https://download.pytorch.org/whl/cpu" +``` + +Packages can be pinned to a specific index via `tool.uv.sources`, to ensure that a given package is installed from the +correct index. For example, to ensure that `torch` is _always_ installed from the `pytorch` index: + +```toml +[tool.uv.sources] +torch = { index = "pytorch" } + +[[tool.uv.index]] +name = "pytorch" +url = "https://download.pytorch.org/whl/cpu" +``` + +Indexes can also be marked as `explicit = true` to prevent packages from being installed from that index +unless explicitly pinned. For example, to ensure that `torch` is installed from the `pytorch` index, but all other +packages are installed from the default index: + +```toml +[tool.uv.sources] +torch = { index = "pytorch" } + +[[tool.uv.index]] +name = "pytorch" +url = "https://download.pytorch.org/whl/cpu" +explicit = true +``` + +To define an additional index outside a `pyproject.toml` file, use the `--index` command-line argument +(or the `UV_INDEX` environment variable); to replace the default index (PyPI), use the `--default-index` command-line +argument (or `UV_DEFAULT_INDEX`). + +These changes are entirely backwards-compatible with the deprecated `--index-url` and `--extra-index-url` options, +which continue to work as before. + +See the [Index](https://docs.astral.sh/uv/configuration/indexes/) documentation for more. + +### Enhancements + +- Add index URLs when provided via `uv add --index` or `--default-index` ([#7746](https://github.com/astral-sh/uv/pull/7746)) +- Add support for named and explicit indexes ([#7481](https://github.com/astral-sh/uv/pull/7481)) +- Add templates for popular build backends ([#7857](https://github.com/astral-sh/uv/pull/7857)) +- Allow multiple pinned indexes in `tool.uv.sources` ([#7769](https://github.com/astral-sh/uv/pull/7769)) +- Allow users to incorporate Git tags into dynamic cache keys ([#8259](https://github.com/astral-sh/uv/pull/8259)) +- Pin named indexes in `uv add` ([#7747](https://github.com/astral-sh/uv/pull/7747)) +- Respect named `--index` and `--default-index` values in `tool.uv.sources` ([#7910](https://github.com/astral-sh/uv/pull/7910)) +- Update to latest PubGrub version ([#8245](https://github.com/astral-sh/uv/pull/8245)) +- Enable environment variable authentication for named indexes ([#7741](https://github.com/astral-sh/uv/pull/7741)) +- Avoid showing lower-bound warning outside of explicit lock and sync ([#8234](https://github.com/astral-sh/uv/pull/8234)) +- Improve logging during lock errors ([#8258](https://github.com/astral-sh/uv/pull/8258)) +- Improve styling of `requires-python` warnings ([#8240](https://github.com/astral-sh/uv/pull/8240)) +- Show hint in resolution failure on `Forbidden` (`403`) or `Unauthorized` (`401`) ([#8264](https://github.com/astral-sh/uv/pull/8264)) +- Update to latest `cargo-dist` version (includes new installer features) ([#8270](https://github.com/astral-sh/uv/pull/8270)) +- Warn when patch version in `requires-python` is implicitly `0` ([#7959](https://github.com/astral-sh/uv/pull/7959)) +- Add more context on client errors during range requests ([#8285](https://github.com/astral-sh/uv/pull/8285)) + +### Bug fixes + +- Avoid writing duplicate index URLs with `--emit-index-url` ([#8226](https://github.com/astral-sh/uv/pull/8226)) +- Fix error leading to out-of-bound panic in `uv-pep508` ([#8282](https://github.com/astral-sh/uv/pull/8282)) +- Fix managed distributions of free-threaded Python on Windows ([#8268](https://github.com/astral-sh/uv/pull/8268)) +- Fix selection of free-threaded interpreters during default Python discovery ([#8239](https://github.com/astral-sh/uv/pull/8239)) +- Ignore sources in build requirements for non-source trees ([#8235](https://github.com/astral-sh/uv/pull/8235)) +- Invalid cache when adding lower bound to lockfile ([#8230](https://github.com/astral-sh/uv/pull/8230)) +- Respect index priority when storing credentials ([#8256](https://github.com/astral-sh/uv/pull/8256)) +- Respect relative paths in `uv build` sources ([#8237](https://github.com/astral-sh/uv/pull/8237)) +- Narrow what the pip3. logic drops from entry points. ([#8273](https://github.com/astral-sh/uv/pull/8273)) + +### Documentation + +- Add some additional notes to `--index-url` docs ([#8267](https://github.com/astral-sh/uv/pull/8267)) +- Add upgrade note to README ([#7937](https://github.com/astral-sh/uv/pull/7937)) +- Remove note that "only a single source may be defined for each dependency" ([#8243](https://github.com/astral-sh/uv/pull/8243)) + ## 0.4.22 ### Enhancements diff --git a/Cargo.lock b/Cargo.lock index 70a0eb49235e..aea58177e094 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4096,7 +4096,7 @@ checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" [[package]] name = "uv" -version = "0.4.22" +version = "0.4.23" dependencies = [ "anstream", "anyhow", @@ -5237,7 +5237,7 @@ dependencies = [ [[package]] name = "uv-version" -version = "0.4.22" +version = "0.4.23" [[package]] name = "uv-virtualenv" diff --git a/crates/uv-version/Cargo.toml b/crates/uv-version/Cargo.toml index deaa8eaa1df3..dbf6d8f9ad82 100644 --- a/crates/uv-version/Cargo.toml +++ b/crates/uv-version/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uv-version" -version = "0.4.22" +version = "0.4.23" edition = { workspace = true } rust-version = { workspace = true } homepage = { workspace = true } diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 698a007b5167..155689022e52 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uv" -version = "0.4.22" +version = "0.4.23" edition = { workspace = true } rust-version = { workspace = true } homepage = { workspace = true } diff --git a/docs/guides/integration/docker.md b/docs/guides/integration/docker.md index d691bafc1749..68329e016f98 100644 --- a/docs/guides/integration/docker.md +++ b/docs/guides/integration/docker.md @@ -21,7 +21,7 @@ $ docker run ghcr.io/astral-sh/uv --help uv provides a distroless Docker image including the `uv` binary. The following tags are published: - `ghcr.io/astral-sh/uv:latest` -- `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.4.22` +- `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.4.23` - `ghcr.io/astral-sh/uv:{major}.{minor}`, e.g., `ghcr.io/astral-sh/uv:0.4` (the latest patch version) @@ -62,7 +62,7 @@ In addition, uv publishes the following images: As with the distroless image, each image is published with uv version tags as `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}-{base}` and -`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.4.22-alpine`. +`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.4.23-alpine`. For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv) page. @@ -100,13 +100,13 @@ Note this requires `curl` to be available. In either case, it is best practice to pin to a specific uv version, e.g., with: ```dockerfile -COPY --from=ghcr.io/astral-sh/uv:0.4.22 /uv /uvx /bin/ +COPY --from=ghcr.io/astral-sh/uv:0.4.23 /uv /uvx /bin/ ``` Or, with the installer: ```dockerfile -ADD https://astral.sh/uv/0.4.22/install.sh /uv-installer.sh +ADD https://astral.sh/uv/0.4.23/install.sh /uv-installer.sh ``` ### Installing a project diff --git a/docs/guides/integration/github.md b/docs/guides/integration/github.md index 78351af657aa..91bca2f64ecb 100644 --- a/docs/guides/integration/github.md +++ b/docs/guides/integration/github.md @@ -40,7 +40,7 @@ jobs: uses: astral-sh/setup-uv@v3 with: # Install a specific version of uv. - version: "0.4.22" + version: "0.4.23" ``` ## Setting up Python diff --git a/docs/guides/integration/pre-commit.md b/docs/guides/integration/pre-commit.md index b5e2a171d080..e6651e41eaf7 100644 --- a/docs/guides/integration/pre-commit.md +++ b/docs/guides/integration/pre-commit.md @@ -8,7 +8,7 @@ To compile requirements via pre-commit, add the following to the `.pre-commit-co ```yaml title=".pre-commit-config.yaml" - repo: https://github.com/astral-sh/uv-pre-commit # uv version. - rev: 0.4.22 + rev: 0.4.23 hooks: # Compile requirements - id: pip-compile @@ -20,7 +20,7 @@ To compile alternative files, modify `args` and `files`: ```yaml title=".pre-commit-config.yaml" - repo: https://github.com/astral-sh/uv-pre-commit # uv version. - rev: 0.4.22 + rev: 0.4.23 hooks: # Compile requirements - id: pip-compile @@ -33,7 +33,7 @@ To run the hook over multiple files at the same time: ```yaml title=".pre-commit-config.yaml" - repo: https://github.com/astral-sh/uv-pre-commit # uv version. - rev: 0.4.22 + rev: 0.4.23 hooks: # Compile requirements - id: pip-compile diff --git a/pyproject.toml b/pyproject.toml index e8cc9d168c44..ccda388fb8a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "uv" -version = "0.4.22" +version = "0.4.23" description = "An extremely fast Python package and project manager, written in Rust." authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }] requires-python = ">=3.8"