poetry
poetry copied to clipboard
Non-Linux wheel refs are discarded from poetry.lock
- [X] I am on the latest Poetry version.
- [X] I have searched the issues of this repo and believe that this is not a duplicate.
- [X] If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: macOS Big Sur 11.6
- Poetry version: 1.1.11
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/castarco/a32b9b65706d3e31047ac8b777d0fb81
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"},
]
Closing this because new package versions don't show this problem, and I did not see it with anything else, although I still think it would be worth trying to understand what happened here.
@castarco this is pretty easy to replicate in my case.
Given the following dependencies in pyproject.toml
:
- Execute
poetry lock
inside of a linux-based container
(volume mount the current dir into the container so that changes persist after exit) - Observe that the lock file contains
[metadata.files]
section which includes wheel digests for many packages. - Execute
poetry lock
on the macOS 12.4 host machine. Poetry 1.1.14 installed in both environments. - 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"
I think the issue may be poetry's cache of a pypi bug of a week or so ago, try clearing out the poetry cache and trying again.
@clintonroy looks like you're correct. The following resolved my issue and now poetry lock
operates identical regardless of environment. PEBKAC 🤦🏻.
$ poetry cache clear _default_cache --all
$ poetry cache clear pypi --all
Not PEBKAC at all. Pypi had an issue, and unfortunately poetry cached that issue. Please close the issue if you're happy.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.