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.

breaking change: invert `lock --no-update` to `lock --update` (or similar)

See original GitHub issue
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Now that https://github.com/python-poetry/poetry/issues/1614 is fixed and released (yay!), I’d like to propose that for v2, there is a breaking change to make Poetry more opinionated and preserve the versions in the lockfile by default, only updating when explicitly asked to (such as with the update command or some kind of --update flag to lock). Doing so follows the patterns in analogous tools like Yarn and Cargo and adheres to the principle of least surprise.

See also the philosophically-related https://github.com/python-poetry/poetry/issues/2370.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:84
  • Comments:7

github_iconTop GitHub Comments

20reactions
michalszelagsonoscommented, Mar 13, 2021

+1 for this feature. Our project is pretty big where many folks, with various skills, contribute and when dependencies move in unexpected ways, it creates lots of waves. It’s better to be explicit in such situations and do exactly what the user is requesting.

13reactions
AleCandidocommented, Jun 1, 2022

Actually, what would be the difference between:

  • poetry lock --update: generate the lock file, updating the dependencies
  • poetry update: update the dependencies, generating the lock file

No one of the two will change the content of pyproject.toml, and then they both generate a lock file compliant with it.

To me, the two commands are doing the same operation, but maybe I’m just not able to spot the difference.

If this is actually true, it would be confusing to have two different commands performing the exact same operation, so I’d rather propose to make poetry lock always behaving in the --no-update mode, and nothing else. To update, there is a dedicated command.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing Poetry 1.3.0 | Blog
The lock file format has been changed to better support explicit sources. This change should be mostly transparent for users, as Poetry ...
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 can I fix the "Another Update in Progress" WordPress ...
After installing the plugin, proceed to Settings > Fix Another Update in Progress to remove the lock. You should see the “There is...
Read more >
TBS TANGO 2 Radio - Team BlackSheep
Modifying it is a matter of screwing in the throttle-lock screw and loosening the other. The rest is changed in the radio configuration...
Read more >
MV7 User Guide - Shure Publications
Connect the other end of the Micro-B USB cable to your laptop. ... Settings lock prevents changes to microphone settings from accidental touches....
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