-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
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:
Ubuntu 18.04 bionic - Poetry version:
Poetry version 1.0.10 - Link of a Gist with the contents of your pyproject.toml file:
N/A
Issue
Starting with 1.1.0 of Poetry poetry install is failing for some of our private packages:
$ poetry install --no-interaction --no-ansi
Creating virtualenv project-name-nxCwz_m9-py3.8 in /builds/REDACTED/.cache/poetry/virtualenvs
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.
Package operations: 85 installs, 0 updates, 0 removals
• Installing six (1.15.0)
<SNIP>
• Installing private-package-1 (0.2.1)
RuntimeError
Unable to find installation candidates for private-package-1 (0.2.1)
at /usr/local/lib/python3.8/site-packages/poetry/installation/chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
• Installing flake8-print (3.1.4)
• Installing hypothesis (5.26.0)
• Installing isort (4.3.21)
• Installing jsonschema (3.2.0)
• Installing mock (4.0.2)
• Installing mypy (0.780)
• Installing networkx (2.4)
• Installing pytest-cov (2.10.1)
• Installing private-package-2 (0.1.6)
RuntimeError
Unable to find installation candidates for private-package-2 (0.1.6)
at /usr/local/lib/python3.8/site-packages/poetry/installation/chooser.py:72 in choose_for
68│
69│ links.append(link)
70│
71│ if not links:
→ 72│ raise RuntimeError(
73│ "Unable to find installation candidates for {}".format(package)
74│ )
75│
76│ # Get the best link
• Installing pyyaml (5.3.1)
• Installing seed-isort-config (2.2.0)
• Installing sentry-sdk (0.17.3)
• Installing tabulate (0.8.7)
• Installing taskipy (1.3.0)
• Installing vulture (1.6)
• Installing xlrd (1.2.0)
Note, it returns non-zero but other than the error in the middle of the install it doesn't actually have a specific message.
After playing around a bit with poetry update I discovered that adding type = "legacy" to the poetry.lock for those packages fixes this.
diff --git a/project-name/poetry.lock b/project-name/poetry.lock
index ece9221..83d5f84 100644
--- a/project-name/poetry.lock
+++ b/project-name/poetry.lock
@@ -446,6 +446,7 @@ snappy = ["python-snappy (>=0.5.4,<0.6.0)"]
[package.source]
reference = "gitlabprivate"
+type = "legacy"
url = "https://gitlab.com/api/v4/projects/REDACTED/packages/pypi/simple"
[[package]]
@@ -921,6 +922,7 @@ python-json-logger = ">=0.1.11,<0.2.0"
[package.source]
reference = "gitlabprivate"
+type = "legacy"
url = "https://gitlab.com/api/v4/projects/REDACTED/packages/pypi/simple"
[[package]]Based on this part of the blogpost[1] that suggests 1.1.0 should be able to read previous versions but not vice versa, this is likely unintended.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected