-
Notifications
You must be signed in to change notification settings - Fork 901
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
Source Distribution Format spec requires a Metadata-Version forbidden by PyPI #1421
Comments
Have a look at the introduction of the specification. It is simply a guideline for source distributions which actually have metadata version 2.2 and higher, and doesn't require source distributions to have:
Therefore I think the |
The current text doesn't support that reading, though. First, if the entire document were only meant to apply to 2.2 or above, this sentence would not need to be phrased as a restriction on behavior:
And second, the section you quoted refers to something different. A fuller quote:
So, if a source distribution doesn't have a |
Problem
PyPI does not allow upload of source distributions or wheels with 2.2 or 2.3 metadata. (The 2.2 bug has been open since June 2021 and the 2.3 bug since June 2022.)
twine upload
fails with:However, the Source Distribution Format spec requires 2.2 or newer metadata:
The spec scopes itself this way:
There are many sdists on PyPI with
pyproject.toml
files, all of which are therefore violating the spec. It seems unrealistic for the spec to insist otherwise, so perhaps its requirements should be updated to allow metadata older than 2.2.History
The relevant language was added in #785, apparently based on PEP 643, both by the same author (cc @pfmoore). However, the MUST language isn't supported by the PEP, which only has a SHOULD requirement:
The PEP also explicitly asserts backward-compatibility:
So the MUST language may have been added accidentally when reformatting the material for PyPUG.
The text was updated successfully, but these errors were encountered: