A basic project with 2 conflicting extras (uv 0.5.5 on Ubuntu):
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.9.0"
dependencies = []
[project.optional-dependencies]
t1 = ["tqdm==4.67.1"]
t2 = ["tqdm==4.67.0"]
[tool.uv]
conflicts = [
[
{ extra = "t1" },
{ extra = "t2" },
],
]
If .venv/ and uv.lock are not present yet, the first execution of uv run --extra t1 python -c "import tqdm" results in ModuleNotFoundError: No module named 'tqdm'. It works the second time or when running e.g. uv lock before. It also works when the extras are not conflicting.