question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
quantuscommented, Mar 1, 2022

I can reproduce this issue locally on both poetry add and poetry update commands. In my case it’s always the coverage 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.

0reactions
quantuscommented, Mar 2, 2022

I just tested and #4618 does solve the issue I’m seeing.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found