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 lock --no-update producing different lock files on different systems

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).

System 1

System 2

  • OS version and name: Ubuntu 18.04.5 LTS
  • Poetry version: 1.1.7
  • same gist as above

Issue

When running poetry lock --no-update on system 1 I get one lock file, while running it on the second system I get a different lock file.

--- a/data-service-python/poetry.lock
+++ b/data-service-python/poetry.lock
@@ -896,6 +896,7 @@ wasmer = [
     {file = "wasmer-1.0.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:a08be93aff695ce3be871994f726716b68bef36bd583bccad75778359cd273df"},
     {file = "wasmer-1.0.0-cp38-none-win_amd64.whl", hash = "sha256:8b13214b5dcc84d43f4c44e2309442497f19137561afada7f34babad89365355"},
     {file = "wasmer-1.0.0-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:1fada13fb536f44e12d7c98c557f5b7a55df94389d3cb90964193dcc8e16f0fa"},
+    {file = "wasmer-1.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f390a54e26775456602f21d5d7d62dbad487f6a1022cab4379d7eac2c812d7ce"},
     {file = "wasmer-1.0.0-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:04e5d51eed336be0e1bf1445aa032fc34466b77220c26732b8990df872f29e92"},
     {file = "wasmer-1.0.0-cp39-none-win_amd64.whl", hash = "sha256:690c5ed46a98e91bc638f52a25e5011c5baa1ef0581f414018eb7aa0e7f844bc"},
     {file = "wasmer-1.0.0-py3-none-any.whl", hash = "sha256:427e9c5e5301a453a09b8b9ceb8c793d85411b8f45e54c9c0d801566dd8d214e"},

Specifically the second system adds one more line for the wasmer resolution. This change is making it really difficult to use continuous integration to enforce a well formed lock file.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
neersightedcommented, Sep 19, 2022

Closing this as there’s not a specific reproduction – what we see here is a consequence of a cached PyPI release being amended much later by the maintainers. Specify --no-cache when invoking Poetry if you want to avoid this situation.

1reaction
mkniewallnercommented, Sep 19, 2022

Came across this. Changes usually occur in [package.extras] section for us. This is quite annoying because diffs are very confusing even for small changes. My colleague is on MacOS and I am on Linux. Anyone knows how to sync it so that we get somewhat similar locks?

Screenshot from 2022-09-19 18-02-31

Here also example with different name (capitalization of Brotli) image

What you mention here is a different issue (https://github.com/python-poetry/poetry/issues/6153) that has been fixed in 1.1.15 and 1.2.0, so using more recent versions will avoid running into this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Commands | Documentation | Poetry - Python dependency ...
By default, this will lock all dependencies to the latest available compatible versions. To only refresh the lock file, use the --no-update option....
Read more >
Dependency Management With Python Poetry
Use the pyproject.toml file; Pin dependencies; Install dependencies with poetry.lock; Execute basic Poetry CLI commands. Using Poetry will help ...
Read more >
Managing Python Dependencies with Poetry
lock was already pushed by other people maintaining the code base. Regardless the case, whenever a poetry.lock file exists and poetry install is...
Read more >
How to use Poetry to manage dependencies in Python
To install multiple packages, specify package names in a sequence such ... If poetry.lock file is available, poetry will read from lock file...
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