Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Metadata-Version: 2.3 breaks wheel upload to Azure Artifacts #1993

Closed
2 tasks done
olivierlefloch opened this issue Mar 14, 2024 · 2 comments
Closed
2 tasks done

Comments

@olivierlefloch
Copy link

Bug Description

The recent change to Metadata-Version from 2.1 to 2.3 ( #1965 ) creates wheels that cannot be uploaded to Azure Artifacts:

Bad Request - Metadata version '2.3' is unsupported. Supported versions
         are: 1.0,1.1,1.2,2.0,2.1.

I've reached out to Azure to improve support, but believe additional coordination might be of value, as a number of very popular Python packages are now using maturin as their build tool, unpinned.

See

Your maturin version (maturin --version)

1.5.0

Your Python version (python -V)

Any?

Your pip version (pip -V)

Any?

What bindings you're using

None

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  • Attempt to upload python wheels built by maturin>=1.5.0 to Azure Artifacts
  • Get an error message indicating that Metadata-Version: 2.3 is not supported
@konstin
Copy link
Member

konstin commented Mar 14, 2024

Hi, i'm sorry that you're experiencing a failure from what should have been a compatible minor version update! PEP 643 (Metadata 2.2) was accepted in december 2020, PEP 685 (Metadata 2.3) in march 2022, additionally, as you correctly mention in the upstream report, indexes should not fail on higher minor versions as noted in the spec; i would urge the azure artifact team to support these standards.

Do you build the packages yourself, or do you reupload them from pypi? If you control the file, you can search and replace in the metadata to hack around this until support is added in azure artifacts:

wget https://files.pythonhosted.org/packages/92/58/116d3c5a4ca56474a6736ba1438bd184886d7f244d72d37b0bd7533e5558/ruff-0.3.2-py3-none-musllinux_1_2_x86_64.whl
unzip ruff-0.3.2-py3-none-musllinux_1_2_x86_64.whl
rm ruff-0.3.2-py3-none-musllinux_1_2_x86_64.whl
sed -i 's/Metadata-Version: 2.3/Metadata-Version: 2.1/g' ruff-*.dist-info/METADATA
zip -r ruff-0.3.2-py3-none-musllinux_1_2_x86_64.whl ./*

Uploaders such as twine should read and use the specified metadata version.

@messense messense removed the bug Something isn't working label Mar 15, 2024
@messense
Copy link
Member

messense commented Mar 28, 2024

According to https://developercommunity.visualstudio.com/t/Uploading-ruff032-to-Azure-Repos-for/10614507#T-N10624141, MSFT is working on support for metadata version 2.3.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants