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

Dependency resolver failure for git installed libraries. #13021

Open
1 task done
M1ha-Shvn opened this issue Oct 17, 2024 · 0 comments
Open
1 task done

Dependency resolver failure for git installed libraries. #13021

M1ha-Shvn opened this issue Oct 17, 2024 · 0 comments
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior

Comments

@M1ha-Shvn
Copy link

Description

Hi.
I want to continue the problem, mensioned in this issue, as I can not understand how to deal with it correctly in my case.

I have a list of private libraries in git repositories. Some of them depend on each other:

  • cq.py_utils library have only pypi dependencies.

  • cq.api_tools library depends on cq.py_utils and has this line in requirements:

    git+ssh://****@github.com/carrotquest/cq.py-utils.git
    

    It's important, that it doesn't require concrete version of cq.py-utils. I don't want to upgrade every library which depends on cq.py-utils when its verion is upgraded.

Than I want to install both libraries with versions, fixed by tags. I place this to requirements:

cq.api-tools @ git+ssh://[email protected]/carrotquest/[email protected]
cq.py-utils @ git+ssh://[email protected]/carrotquest/[email protected]

On pip >= 20.2 I get the following error:

120.7 The conflict is caused by:
120.7     The user requested cq-py-utils 1.10.0 (from git+ssh://****@github.com/carrotquest/[email protected])
120.7     cq-api-tools 2.12.6 depends on cq-py-utils 1.10.0 (from git+ssh://****@github.com/carrotquest/cq.py-utils.git)

From in this issue and its results I understood, that the problem is that URLs are not matching. But the only way to fix version for git repos are tags/commits. And I don't want to fix versions in libraries as it would lead to big amount of unnecessary requirements updates.

Is there a way to resolve this problem?

Expected behavior

From my point of view, directly set commit/tag in GIT-based dependency should be prior to the one where it is not set directly.

pip version

24.2

Python version

3.11.10

OS

Ubuntu 20.04

How to Reproduce

  1. Create first GIT repo with library1 with no dependencies.
  2. Create second GIT repo with library2 and install_requires=["git://library1.git"] in setup.py file
  3. Create project installing some commits/tags of library1 and library2 and try to pip install -U

Output

No response

Code of Conduct

@M1ha-Shvn M1ha-Shvn added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant