New Metadata Version on ruff-0.8.1-py3-none-linux_armv6l.whl
Closed this issue ยท 11 comments
It seems that there is an issue with latest wheel. The metadata version on is at 2.4. The pkginfo package support only metadata versions up to 2.3. This is pretty important since this is a crucial part of how Poetry resolved the package to install. Would it be possible to roll that back, ensuring that none of the released wheels have metadata version >2.3? I am not sure what the metadata versions of all the other wheels are, but I am getting the error for ruff-0.8.1-py3-none-linux_armv6l.whl.
here is the exact error:
C:\Users\\...\.venv\Lib\\site-packages\pkginfo\\distribution.py:175: NewMetadataVersion: New metadata version (2.4) higher than latest supported version: parsing as 2.3
warnings.warn(NewMetadataVersion(self.metadata_version))
Unable to determine package info for path: C:\Users\...\AppData\Local\Temp\2\tmpivaox21p\ruff-0.8.1-py3-none-linux_armv6l.whl
Unknown metadata version: 2.4
Steps to recreate.
- windows machine
- start a poetry project
- add ruff = "0.8.1" to the dependencies
- run poetry update
What version of poetry are you using? I just tried installing Ruff with Poetry 1.8.4 and it was successful:
โฏ uvx poetry add ruff --python 3.10
Using version ^0.8.1 for ruff
Updating dependencies
Resolving dependencies... (0.1s)
Package operations: 1 install, 0 updates, 0 removals
- Installing ruff (0.8.1)
Writing lock file
Maybe it depends on how poetry is installed? I'm seeing the same issue with poetry 1.8.4 installed via pipx.
Maybe it depends on how poetry is installed? I'm seeing the same issue with poetry 1.8.4 installed via pipx.
I hope not. That would be rather surprising. Can you share what platform your on and run poetry --version
? I now verified that adding ruff works on macos and windows.
I have the same issue:
OS: Ubuntu 22.04.5 LTS 64-bit
Poetry: 1.8.4 (Installed via vendor-specific installation script)
Python: 3.12.7 (Installed via `pyenv 2.4.19-2-g61406193`)
Downloading ...pypi/packages/packages/a2/d6/1a6314e568db88acdbb5121ed53e2c52cebf3720d3437a76f82f923bf171/ruff-0.8.1-py3-none-linux_armv6l.whl#sha256=fae0805bd514066f20309f6742f6ee7904a773eb9e6c17c45d6b1600ca65c9b5 96% (14.7s).../.local/share/pypoetry/venv/lib/python3.12/site-packages/pkginfo/distribution.py:175: NewMetadataVersion: New metadata version (2.4) higher than latest supported version: parsing as 2.3
warnings.warn(NewMetadataVersion(self.metadata_version))
Unable to determine package info for path: /tmp/tmpv0nhj4py/ruff-0.8.1-py3-none-linux_armv6l.whl
Unknown metadata version: 2.4
I suggest reporting this to poetry because downgrading the metadata version is not in our control (managed by maturin)
To give some more context on why we bumped the metadata version.
We tried publishing Ruff 0.8 with the old metadata version but pypi rejected the wheel (unlike previous releases where this just worked)
error: Failed to publish `wheels/ruff-0.8.1-py3-none-linux_armv6l.whl` to https://upload.pypi.org/legacy/
Caused by: Upload failed with status code 400 Bad Request. Server says: 400 license-file introduced in metadata version 2.4, not 2.3. See https://packaging.python.org/specifications/core-metadata for more information.
That's why I don't think we can do anything at our end.
I hope not. That would be rather surprising. Can you share what platform your on and run poetry --version? I now verified that adding ruff works on macos and windows.
FWIW, I'm seeing this on macOS, with poetry (installed via pip install
) 1.8.4
and Python 3.11.10
) on our existing projects
Though, in a completely fresh environment...
mkdir /tmp/test_ruff_poetry
cd /tmp/test_ruff_poetry
mkdir -p src/test
touch src/test/__init__.py
python3.11 -m venv .venv
source .venv/bin/activate
python --version
# Python 3.11.10
pip install poetry
which poetry
# <in the venv in curr dir>
poetry --version
# Poetry (version 1.8.4)
cat << EOF > pyproject.toml
[tool.poetry]
name="test"
authors=[]
version="0.0.0"
description=""
packages=[
{ include = "test", from="src"}
]
[tool.poetry.dependencies]
python = ">=3.11,<4"
ruff = "0.8.1"
EOF
poetry install
works.
Of note: We usually pull our deps through an internal Artifactory; the above (without the artifactory source) works, but keeping the same thing but attempting to use the internal repository encounters the error
[[tool.poetry.source]]
name = "Private Internal Artifactory Source"
url = "..."
priority = "primary"
I suggest reporting this to poetry ...
Related to this: python-poetry/poetry#9670
Could you try updating the pkginfo
dependency. The newest released version (which poetry uses) adds support for 2.4. This also explains why running poetry with uvx
works because it installs the latest pkginfo
version but might not work in your project where you use an older verison.
The newest released version (which poetry uses) adds support for 2.4. This also explains why running poetry with uvx works because it installs the latest pkginfo version but might not work in your project where you use an older verison.
Trying the above again, looks like it does get the newest pkginfo
version (1.12.0
, that was released 12 minutes ago) and works for me for both the public and Artifactory example
I'll close this because there's now a known fix on the poetry side (upgrade pkginfo
). Let me know if it doesn't resolve your problem.