Skip to content

uv refuses to resolve deps with dynamic SCM version, missing tags and cylic dependencies A:dev -> B, B -> A, hinting at name shadowing #8148

@pawamoy

Description

@pawamoy

It happens in several of my projects now. Proper issue as a follow-up of #7329.

Example:

Using CPython 3.10.15 interpreter at: /opt/hostedtoolcache/Python/3.10.15/x64/bin/python
Creating virtual environment at: .venv
  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of mkdocstrings-python-legacy are
      available:
          mkdocstrings-python-legacy<=0.2.1
          mkdocstrings-python-legacy==0.2.2
          mkdocstrings-python-legacy==0.2.3
          mkdocstrings-python-legacy==0.2.4
      and mkdocstrings-python-legacy>=0.2.1,<=0.2.2 depends on your project,
      we can conclude that mkdocstrings-python-legacy>=0.2.1,<0.2.3 depends on
      your project.
      And because mkdocstrings-python-legacy>=0.2.3 depends on your project,
      we can conclude that mkdocstrings-python-legacy>=0.2.1 depends on your
      project.
      And because mkdocstrings[python-legacy] depends on
      mkdocstrings-python-legacy>=0.2.1 and your project requires
      mkdocstrings[python-legacy], we can conclude that your projects's
      requirements are unsatisfiable.

      hint: The package `mkdocstrings-python-legacy` depends on the package
      `mkdocstrings` but the name is shadowed by your project. Consider
      changing the name of the project.

Here uv claims that since mkdocstrings-python-legacy depends on mkdocstrings, and my project is named mkdocstrings, it cannot resolve deps. My project is mkdocstrings, it's not shadowing it 😅

In this case, mkdocstrings depends on mkdocstrings-python-legacy as an extra (optional dependency).

[project.optional-dependencies]
python-legacy = ["mkdocstrings-python-legacy>=0.2.1"]

But I get the same error when project A depends on B as a development dependency.

I'm not sure if the non-editable mode is the issue here, as I cannot reproduce this behavior locally.

Metadata

Metadata

Assignees

Labels

error messagesMessaging when something goes wrongquestionAsking for clarification or support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions