`poetry add` updates the version of the other dependencies
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.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
OS version and name: Kubuntu 20.04 Poetry version: 1.1.12
Issue
Hi there! First of all, thank you very much for this tool!
Recently, I have found out a weird behavior to me. However, maybe it poetry works as expected, so please then explain this behavior to me.
The issue is the following. When you add a new dependency to a project using the poetry add
command, poetry also updates the versions of other libraries if the updates are available despite that the previous version is recorded in the poetry.lock file. Such behavior to me is unexpected and may lead to bugs in the developed application.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Commands | Documentation | Poetry - Python dependency ...
In order to get the latest versions of the dependencies and to update the poetry.lock file, you should use the update command. poetry...
Read more >Update Packages in Python Poetry - YippeeCode
If you need Poetry to update to a specific version, you can run a command poetry add , passing the package name with...
Read more >Dependency Management With Python Poetry
When you run the poetry add command, Poetry automatically updates pyproject.toml and pins the resolved versions in the poetry.lock file. However ...
Read more >python - How to update Poetry's lock file without upgrading ...
There is a specific option for the lock command: poetry lock --no-update. This makes it possible to remove a dependency from pyproject.toml ...
Read more >How to use Poetry to manage dependencies in Python
Also, when another user will use poetry to install dependency the exact same ... and poetry.lock with new versions and updated dependencies.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can reproduce this issue locally on both
poetry add
andpoetry update
commands. In my case it’s always thecoverage
dependency that is being updated unexpectedly and after doing a bit more searching I found an existing issue #4612 which looks really similar to my situation. So something similar might have been happening here.I just tested and #4618 does solve the issue I’m seeing.