-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Running uv version --bump major to update the project version "fails" when there are conflicting extras. The update still goes through, but it prints an error and exits with status code 2. The bump (major/minor/patch) doesn't matter.
This was working normally on 0.7.2. It started happening when I upgraded to 0.7.19.
Full example:
❯ cat pyproject.toml
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.12.0"
dependencies = []
[project.optional-dependencies]
cpu = [
"torch>=2.7.0",
"torchvision>=0.22.0",
]
cu128 = [
"torch>=2.7.0",
"torchvision>=0.22.0",
]
[tool.uv]
conflicts = [
[
{ extra = "cpu" },
{ extra = "cu128" },
],
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu128", extra = "cu128" },
]
torchvision = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu128", extra = "cu128" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true⏎
❯ uv version --bump major
Using CPython 3.12.9
Creating virtual environment at: .venv
Resolved 34 packages in 925ms
error: Extras `cpu` and `cu128` are incompatible with the declared conflicts: {`project[cpu]`, `project[cu128]`}Project file from https://docs.astral.sh/uv/guides/integration/pytorch/#configuring-accelerators-with-optional-dependencies
Platform
Darwin 23.4.0 arm64 Darwin (Sonoma 14.4.1)
Version
uv 0.7.19 (38ee6ec 2025-07-02)
Python version
Python 3.12.9
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working