command to check lock file
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
Would it be possible to add a poetry check
command (oh, I see you’e used that already, maybe the command could be extended or have a poetry lock --check
?) that will return zero if the current poetry.lock is both correct w.r.t. the pyproject.toml (ie: packages match) and that it matches the output of poetry lock
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:35
- Comments:13 (1 by maintainers)
Top Results From Across the Web
How to Find Which Process has Locked a File in Windows
1. Resource Monitor · 2. Process Explorer · 3. Handle from Windows Sysinternals · 4. OpenFiles.exe — a built-in console tool · 5....
Read more >How to check in command-line if a given file or directory is ...
( type nul >> file.txt ) 2>nul || echo File is locked! type nul command gives an empty output and does not affect...
Read more >How to tell which Process is locking or using a File in ...
In the Resource Monitor window, go to the CPU tab and expand the Associated Handles option. Now, in the search box, type the...
Read more >Find out which process is locking a file or folder in Windows
Go to Find, Find Handle or DLL.. or simply press Ctrl + F . Enter image description here · Enter the name of...
Read more >lockfile-check(1) - Linux man page
The lockfile-check command tests whether or not a valid lock already exists. Options. -q, --quiet. Suppress any output. Success or failure will only...
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 FreeTop 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
Top GitHub Comments
The problem is that
poetry update
does two things, if my understanding is right:Updates/installs/removes packages to match changes that were made to pyproject.toml
Updates packages even their specification did not change in pyproject.toml wasn’t because it finds a new version which is allowed by semver
In the first case, the
peotry.lock
does no longer match thepyproject.toml
, it’s “illegal”. In the second case, thepoetry.lock
still matches the thepyproject.toml
, it’s legal, just not using the latest semver-allowed version.In CI, you usually want to force a
poetry update
in the first case, but not the second.The proposed solutions in this thread do not differentiate between these two cases as far as I could tell. Therefore they aren’t really a solution and we still need a command.
I had figure out script to emulate the behavior of #1954 and fortunately it is simple: