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.

Non-Linux wheel refs are discarded from poetry.lock

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

Issue

poetry keeps removing wheel references for macos & windows systems from the poetry.lock file when I run the poetry update command.

More specifically, it does that with polars v0.9.12 (but not with polars v0.9.11) (while it’s able to install the package if I manually add the entries to the lock file for the macos wheels). The wheels exist and are reachable.

Reference to the other tracked issue for polars: https://github.com/pola-rs/polars/issues/1421#issuecomment-934165638

manually edited “block” in poetry.lock (adding the first wheel, for macos):

polars = [
    {file = "polars-0.9.12-cp36-abi3-macosx_10_7_x86_64.whl", hash = "sha256:a9d03bf08b8d3cb54de337575c0e82fca499906a96e339ac85f58b07199c153f"},
    {file = "polars-0.9.12-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2bf976a7f10c72cd437a3a1e8888f4416be84c7f23c97f847eca363c8771471"},
    {file = "polars-0.9.12.tar.gz", hash = "sha256:eb8ad15ea155d2840de07e0f3b1bfadd7fec53591045a8b29a076e5f7a76de2b"},
]

After running poetry update (from macOS):

polars = [
    {file = "polars-0.9.12-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2bf976a7f10c72cd437a3a1e8888f4416be84c7f23c97f847eca363c8771471"},
    {file = "polars-0.9.12.tar.gz", hash = "sha256:eb8ad15ea155d2840de07e0f3b1bfadd7fec53591045a8b29a076e5f7a76de2b"},
]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adrianmacecommented, Aug 2, 2022

@castarco this is pretty easy to replicate in my case.

Given the following dependencies in pyproject.toml:

  1. Execute poetry lock inside of a linux-based container
    (volume mount the current dir into the container so that changes persist after exit)
  2. Observe that the lock file contains [metadata.files] section which includes wheel digests for many packages.
  3. Execute poetry lock on the macOS 12.4 host machine. Poetry 1.1.14 installed in both environments.
  4. Observe that the lock file no longer lists wheel digests for many of the packages.
[tool.poetry.dependencies]
python = "^3.10"
aws-cdk-lib = "2.28.0"
0reactions
clintonroycommented, Aug 3, 2022

Not PEBKAC at all. Pypi had an issue, and unfortunately poetry cached that issue. Please close the issue if you’re happy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

poetry install | SolverProblemError Because my_project ...
If you are locking in a project where sub-dependencies are directly available on the file system, some *.egg-info directories may interfere with ...
Read more >
Python Requirements - Serverless Framework: Plugins
Compiling non-pure-Python modules or fetching their manylinux wheels is supported on non-linux OSs via the use of Docker and the docker-lambda image.
Read more >
Commands | Documentation | Poetry - Python dependency ...
If there is a poetry.lock file in the current directory, it will use the exact versions from there instead of resolving them. This...
Read more >
Python Poetry Cheat Sheet - YippeeCode
When Poetry has finished installing, it writes all of the packages and the exact versions of them that it downloaded to the poetry.lock...
Read more >
Insights into how poetry.lock works cross platform - Packaging
Here is a fragment from the lockfile for a package that is only distributed as bdist wheel for or python -m poetry add...
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