Skip to content

uv add confuses dependency versions when installing multiple libraries #6933

@notypecheck

Description

@notypecheck

I've been migrating a project from pdm to uv and faced an error when installed dev libraries.

Environment info

uv version:

$ uv --version
uv 0.4.2 (736ccb950 2024-09-01)

OS: Windows, MacOS

Steps to reproduce

uv init
uv add --dev mypy ruff radon vulture pytest coverage factory-boy sqlalchemy-pytest types-python-dateutil jinja2 types-click deptry types-openpyxl types-aiobotocore-s3
Resolved 32 packages in 1.64s
  × No solution found when resolving dependencies:
  ╰─▶ Because only ruff<=0.6.3 is available and test-uv:dev depends on ruff>=2.9.0.20240821, we can conclude
      that test-uv:dev's requirements are unsatisfiable.
      And because your project depends on test-uv:dev, we can conclude that your project's requirements are
      unsatisfiable.
  help: If this is intentional, run `uv add --frozen` to skip the lock and sync steps.

What interesting is that in lockfile correct version of ruff is used (0.6.3),

In this particular case version 2.9.0.20240821 comes from types-python-dateutil

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions