Skip to content

Commit

Permalink
Bump version to v0.5.3 (#9229)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Nov 19, 2024
1 parent dae630a commit 56d3622
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 17 deletions.
79 changes: 78 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
# Changelog

## 0.5.3

This release includes support for conflicting optional dependencies and dependency groups in the uv resolver, including the ability to specify dependency sources (like index assignment) on a per-extra or per-group basis.

For example, you can now select CPU-only vs. GPU-enabled PyTorch builds at runtime by defining conflicting extras in a `pyproject.toml`, and assigning different extras to different PyTorch indexes:

```toml
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.12.0"

[project.optional-dependencies]
# Include `torch` whenever `--extra cpu` or `--extra gpu` is provided.
cpu = ["torch>=2.5.1"]
gpu = ["torch>=2.5.1"]

[tool.uv]
# But allow `cpu` and `gpu` to choose conflicting versions of `torch`.
conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]]

[tool.uv.sources]
torch = [
# With `--extra cpu`, pull PyTorch from the CPU-only index.
{ index = "pytorch-cpu", extra = "cpu", marker = "platform_system != 'Darwin'" },
# With `--extra gpu`, pull PyTorch from the GPU-enabled index.
{ index = "pytorch-gpu", extra = "gpu" },
]

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[[tool.uv.index]]
name = "pytorch-gpu"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
```

See the [PyTorch](https://docs.astral.sh/uv/guides/integration/pytorch/) documentation for more.

### Enhancements

- Allow conflicting extras in explicit index assignments ([#9160](https://github.com/astral-sh/uv/pull/9160))
- Support overrides and constraints in PEP 723 scripts ([#9162](https://github.com/astral-sh/uv/pull/9162))
- Update `uv tool install --force` to imply `--reinstall-package <name>` ([#9074](https://github.com/astral-sh/uv/pull/9074))
- Turn `--verify-hashes` on by default ([#9170](https://github.com/astral-sh/uv/pull/9170))

### Performance

- Enable `zlib-rs` on all platforms ([#9202](https://github.com/astral-sh/uv/pull/9202))

### Bug fixes

- Allow apostrophe in virtual environment name ([#8984](https://github.com/astral-sh/uv/pull/8984))
- Automatically retry body errors when processing response ([#9213](https://github.com/astral-sh/uv/pull/9213))
- Detect nested workspace inside the current workspace and members with identical names ([#9094](https://github.com/astral-sh/uv/pull/9094))
- Only install the specified project with `--frozen --package` in legacy non-`[project]` workspaces ([#9215](https://github.com/astral-sh/uv/pull/9215))
- Respect `[[tool.uv.index]]` in PEP 723 scripts ([#9208](https://github.com/astral-sh/uv/pull/9208))
- Show derivation markers for resolutions with project name ([#9136](https://github.com/astral-sh/uv/pull/9136))
- Sort distributions when computing hash ([#9185](https://github.com/astral-sh/uv/pull/9185))
- Include trampolines in source distributions on Windows ([#9172](https://github.com/astral-sh/uv/pull/9172))

### Documentation

- Add `--index <name>=<url>` syntax to index documentation ([#9139](https://github.com/astral-sh/uv/pull/9139))
- Add documentation for using uv with PyTorch ([#9210](https://github.com/astral-sh/uv/pull/9210))

### Error messages

- Add a dedicated error for `include = "dev"` with `tool.uv.dev-dependencies` ([#9173](https://github.com/astral-sh/uv/pull/9173))
- Avoid showing disjoint marker error with `true` ([#9169](https://github.com/astral-sh/uv/pull/9169))
- Improve error message when `git` is not found ([#9206](https://github.com/astral-sh/uv/pull/9206))
- Include extras and dependency groups in derivation chains ([#9113](https://github.com/astral-sh/uv/pull/9113))
- Include version constraints in derivation chains ([#9112](https://github.com/astral-sh/uv/pull/9112))

## 0.5.2

### Enhancements
Expand Down Expand Up @@ -256,7 +333,7 @@ Previously, uv used a single `tool.uv.dev-dependencies` list for declaration of

For compatibility, and to simplify usage for people that do not need multiple groups, uv special-cases the group named `dev`. The `dev` group is equivalent to `tool.uv.dev-dependencies`. The contents of `tool.uv.dev-dependencies` will merged into the `dev` group in uv's resolver. The `--dev`, `--only-dev`, and `--no-dev` flags remain as aliases for the corresponding `--group` options. Support for `tool.uv.dev-dependencies` remains in this release, but will display warnings in a future release.

uv syncs the `dev` group by default — this matches the exististing behavior for `tool.uv.dev-dependencies`. The default groups can be changed with the `tool.uv.default-groups` setting.
uv syncs the `dev` group by default — this matches the existing behavior for `tool.uv.dev-dependencies`. The default groups can be changed with the `tool.uv.default-groups` setting.

Thank you to Stephen Rosen who authored PEP 735.

Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/uv-version/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "uv-version"
version = "0.5.2"
version = "0.5.3"
edition = { workspace = true }
rust-version = { workspace = true }
homepage = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "uv"
version = "0.5.2"
version = "0.5.3"
edition = { workspace = true }
rust-version = { workspace = true }
homepage = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ uv provides a standalone installer to download and install uv:
Request a specific version by including it in the URL:

```console
$ curl -LsSf https://astral.sh/uv/0.5.2/install.sh | sh
$ curl -LsSf https://astral.sh/uv/0.5.3/install.sh | sh
```

=== "Windows"
Expand All @@ -41,7 +41,7 @@ uv provides a standalone installer to download and install uv:
Request a specific version by including it in the URL:

```console
$ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.2/install.ps1 | iex"
$ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.3/install.ps1 | iex"
```

!!! tip
Expand Down Expand Up @@ -217,7 +217,7 @@ If you need to remove uv from your system, just remove the `uv` and `uvx` binari

!!! note

Prior to 0.5.2, uv was installed into `~/.cargo/bin`. The binaries can be removed from there to
Prior to 0.5.3, uv was installed into `~/.cargo/bin`. The binaries can be removed from there to
uninstall. Upgrading from an older version will not automatically remove the binaries from
`~/.cargo/bin`.

Expand Down
8 changes: 4 additions & 4 deletions docs/guides/integration/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.2`
- `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}`, e.g., `ghcr.io/astral-sh/uv:0.5.3`
- `ghcr.io/astral-sh/uv:{major}.{minor}`, e.g., `ghcr.io/astral-sh/uv:0.5` (the latest patch
version)

Expand Down Expand Up @@ -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.5.2-alpine`.
`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.5.3-alpine`.

For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv)
page.
Expand Down Expand Up @@ -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.5.2 /uv /uvx /bin/
COPY --from=ghcr.io/astral-sh/uv:0.5.3 /uv /uvx /bin/
```

Or, with the installer:

```dockerfile
ADD https://astral.sh/uv/0.5.2/install.sh /uv-installer.sh
ADD https://astral.sh/uv/0.5.3/install.sh /uv-installer.sh
```

### Installing a project
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/integration/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.5.2"
version: "0.5.3"
```
## Setting up Python
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/integration/pre-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.2
rev: 0.5.3
hooks:
# Compile requirements
- id: pip-compile
Expand All @@ -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.5.2
rev: 0.5.3
hooks:
# Compile requirements
- id: pip-compile
Expand All @@ -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.5.2
rev: 0.5.3
hooks:
# Compile requirements
- id: pip-compile
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "uv"
version = "0.5.2"
version = "0.5.3"
description = "An extremely fast Python package and project manager, written in Rust."
authors = [{ name = "Astral Software Inc.", email = "[email protected]" }]
requires-python = ">=3.8"
Expand Down

0 comments on commit 56d3622

Please sign in to comment.