Re-running `poetry install` "updates" packages to already existing versions
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
OS version and name: Debian Buster
-
Poetry version: 1.1.4
-
Link of a Gist with Dockerfile and poetry-files: https://gist.github.com/marhoy/c3850f122f5f2f801c5c3ff916b7fd0e
Issue
When NOT using a virtual environment (POETRY_VIRTUALENVS_CREATE=false
) and running poetry install
multiple times, already installed packages will be “updated” to the already installed versions. This does not happen with poetry-1.0.9 (change line 29 in provided Dockerfile to confirm).
Running docker build .
with the provided files causes:
First run (line 33 in Dockerfile):
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Package operations: 5 installs, 0 updates, 0 removals
• Installing six (1.15.0)
• Installing numpy (1.19.2)
• Installing python-dateutil (2.8.1)
• Installing pytz (2020.1)
• Installing pandas (1.1.3)
Second run (line 42 in Dockerfile):
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Package operations: 0 installs, 5 updates, 0 removals
• Updating six (1.15.0 /home/user/.local/lib/python3.8/site-packages -> 1.15.0)
• Updating numpy (1.19.2 /home/user/.local/lib/python3.8/site-packages -> 1.19.2)
• Updating python-dateutil (2.8.1 /home/user/.local/lib/python3.8/site-packages -> 2.8.1)
• Updating pytz (2020.1 /home/user/.local/lib/python3.8/site-packages -> 2020.1)
• Updating pandas (1.1.3 /home/user/.local/lib/python3.8/site-packages -> 1.1.3)
PS: The reason for doing this is to make docker cache the project dependencies. So when I change my own code, only my own package will be installed, the project dependencies are cached.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Same problem here. Seems that using
POETRY_VIRTUALENVS_CREATE=false
causes reinstallation of all packages to the current versions.Any updates on this? Is this the way it should be behaving without
POETRY_VIRTUALENVS_CREATE
? Can confirm same behaviour as outlined above in poetry 1.1.12 and python 3.9.9.