python-poetry / python-poetry/poetry
Version solving failed for packages from private repository with Poetry > 1.0.10
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: Linux
-
Poetry version: 1.1.5
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/itssimon/cd2ee0d6b407cf003cad3630ccb4776d
Issue
I have two dependencies which need to be installed from private repositories (GitLab). I have configured these two repositories in the pyproject.toml and added credentials as outlined in the documentation:
[tool.poetry.dependencies]
# ...
gcds-common = {extras = ["mosaiq"], version = "^0.12.5"}
gcds-ml = {extras = ["lightgbm", "roberta"], version = "^0.4.5"}
# ...
[[tool.poetry.source]]
name = "common"
url = "https://gitlab.com/api/v4/projects/xxx1/packages/pypi/simple"
secondary = true
[[tool.poetry.source]]
name = "ml"
url = "https://gitlab.com/api/v4/projects/xxx2/packages/pypi/simple"
secondary = true
However Poetry versions > 1.0.10 are not able to resolve these dependencies. poetry update -vvv shows the following output:
PyPI: No packages found for gcds-ml >=0.4.5,<0.5.0
1: fact: no versions of gcds-ml match >=0.4.5,<0.5.0
1: conflict: no versions of gcds-ml match >=0.4.5,<0.5.0
1: ! gcds-ml (^0.4.5) is satisfied by gcds-ml (^0.4.5)
1: ! which is caused by "gcds-clinex depends on gcds-ml (^0.4.5)"
1: ! thus: version solving failed
1: Version solving took 24.006 seconds.
1: Tried 1 solutions.
...
SolverProblemError
Because gcds-clinex depends on gcds-ml (^0.4.5) which doesn't match any versions, version solving failed.
So it seems that the private repositories are ignored and Poetry tries to resolve these dependencies with the public PyPI.
Interestingly, this all works as expected in Poetry version 1.0.10, so there must've been a regression a while ago that has not been fixed since.
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
Start by reproducing the failure with the provided pyproject.toml configuration using poetry update -vvv, comparing Poetry 1.0.10 with 1.1.5. Trace dependency source selection and version solving for the two GitLab repositories; done means private packages resolve from their configured repositories rather than falling back to PyPI.
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
- Clearly specified
- Newbie friendliness
- 35/100