Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv add confuses dependency versions when installing multiple libraries #6933

Closed
ThirVondukr opened this issue Sep 2, 2024 · 3 comments · Fixed by #6939
Closed

uv add confuses dependency versions when installing multiple libraries #6933

ThirVondukr opened this issue Sep 2, 2024 · 3 comments · Fixed by #6939
Assignees
Labels
bug Something isn't working

Comments

@ThirVondukr
Copy link

ThirVondukr commented Sep 2, 2024

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

@ThirVondukr ThirVondukr changed the title uv add fails when used to install multiple libraries uv add --dev fails when used to install multiple libraries Sep 2, 2024
@ThirVondukr ThirVondukr changed the title uv add --dev fails when used to install multiple libraries uv add --dev confuses dependency versions when installing multiple libraries Sep 2, 2024
@ThirVondukr ThirVondukr changed the title uv add --dev confuses dependency versions when installing multiple libraries uv add confuses dependency versions when installing multiple libraries Sep 2, 2024
@erob-archim
Copy link

Adding another example in case it's helpful:

>>> uv add torchgeo torch numpy geopandas result shapely pyproj opencv-python-headless rasterio rustedpy-maybe loguru adbc-driver-postgresql scipy pyarrow
Resolved 95 packages in 0.90ms
  × No solution found when resolving dependencies for split (python_full_version < '3.11' and platform_system == 'Darwin' and sys_platform == 'linux'):
  ╰─▶ Because only loguru<=0.7.2 is available and your project depends on loguru>=4.10.0.84, 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.
>>> uv add torchgeo torch numpy geopandas result shapely pyproj opencv-python-headless rasterio rustedpy-maybe adbc-driver-postgresql scipy pyarrow
Resolved 94 packages in 354ms
  × No solution found when resolving dependencies for split (python_full_version < '3.11' and platform_system == 'Darwin' and sys_platform == 'linux'):
  ╰─▶ Because only numpy<=2.1.0 is available and your project depends on numpy>=4.10.0.84, 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.

Interesting that it's saying the same incorrect version number for both numpy and loguru

@charliermarsh
Copy link
Member

Thanks, I'll look into this ASAP.

@charliermarsh charliermarsh self-assigned this Sep 2, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Sep 2, 2024
@charliermarsh
Copy link
Member

It's a bug from #6388. I'll either fix and re-release, or revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants