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:
[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.
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:
[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.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps uv from 0.5.2 to 0.5.3.
Release notes
Sourced from uv's releases.
... (truncated)
Changelog
Sourced from uv's changelog.
... (truncated)
Commits
56d3622
Bump version to v0.5.3 (#9229)dae630a
Update Rust crate fs-err to v3 (#8625)07806c4
Update generate-all (#9223)6d5c708
Typo (#9222)9460398
Build backend: Support data files (#9197)4f6db1d
remove duplicatedPyTorch
entry (#9220)821f3de
Automatically retry body errors when processing response (#9213)9106744
Only install the specified project with--frozen --package
in legacy non-`[...b642dd9
Updateuv tool install --force
to imply--reinstall-package \<name>
(#9074)dea2a04
Add documentation for using uv with PyTorch (#9210)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show