python-poetry / python-poetry/poetry
internal library dosen't get version from git repo
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
OS version and name: MacOS 11.1 (20C69)
-
Poetry version:
1.1.13(tried also on1.2.0b1) -
- Link of a Gist with the contents of your pyproject.toml file: in the issues
Issue
I have a repo A that is using 2 other repos B and C
C is also using B
A's pyproject.toml
B = {git = "<B's github repo>", branch = "my-branch"}
C = {version="^0.5.8"}
B's pyproject.toml (in my-branch branch)
[tool.poetry]
name = "B"
version = "0.31.0"
C's pyproject.toml
B = {version=">=0.30"}
The current versions of B in my PyPI server are (0.30.0 || 0.30.1 || 0.30.2 || 0.30.3 || 0.30.4)
It seems that when locking C inside A, C's not aware B's version is acceptable
Because no versions of B match >0.30,<0.30.1 || >0.30.1,<0.30.2 || >0.30.2,<0.30.3 || >0.30.3,<0.30.4 || >0.30.4
and B (0.30.0) depends on B (0.30.0), B (>=0.30,<0.30.1 || >0.30.1,<0.30.2 || >0.30.2,<0.30.3 || >0.30.3,<0.30.4 || >0.30.4) requires B (0.30.0).
And because B (0.30.1) depends on B (0.30.1)
and B (0.30.2) depends on B (0.30.2), B (>=0.30,<0.30.3 || >0.30.3,<0.30.4 || >0.30.4) requires B (0.30.0 || 0.30.1 || 0.30.2).
And because B (0.30.3) depends on B (0.30.3)
and B (0.30.4) depends on B (0.30.4), B (>=0.30) requires B (0.30.0 || 0.30.1 || 0.30.2 || 0.30.3 || 0.30.4).
Because no versions of C match >0.5.8
and C (0.5.8) depends on B (>=0.30), C (>=0.5.8) requires B (>=0.30).
Thus, C (>=0.5.8) requires B (0.30.0 || 0.30.1 || 0.30.2 || 0.30.3 || 0.30.4).
And because B (rev my-branch) depends on B (rev my-branch), C (>=0.5.8) is incompatible with B (rev my-branch).
So, because A depends on both B (branch my-branch) and C (>=0.5.8), version solving failed.
I tried to publish my-branch as a beta branch, changed A's to use this version, and still had the same issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the lock operation using the A, B, and C pyproject.toml examples, including B from the my-branch Git dependency. Start by tracing how Poetry resolves the Git dependency's version against C's published requirements. Done means locking succeeds when the Git checkout's declared version satisfies C's constraint, with regression coverage for this dependency layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100