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

Twine fails to upload packages with latest metadata-version #1146

Open
1 task done
jaraco opened this issue Sep 6, 2024 · 2 comments
Open
1 task done

Twine fails to upload packages with latest metadata-version #1146

jaraco opened this issue Sep 6, 2024 · 2 comments
Labels

Comments

@jaraco
Copy link
Member

jaraco commented Sep 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues (open and closed), and could not find an existing issue

What keywords did you use to search existing issues?

metadata-version
InvalidDistribution

What operating system are you using?

macOS

If you selected 'Other', describe your Operating System here

No response

What version of Python are you running?

Python 3.12.5

How did you install twine? Did you use your operating system's package manager or pip or something else?

pipx reinstall --python 3.12 twine

What version of twine do you have installed (include the complete output)

5.1.1

Which package repository are you using?

pypi.org

Please describe the issue that you are experiencing

This issue is a reprise of #1059. Now that PEP 639 is provisionally accepted, the coherent system has implemented support, and subsequently packages built under that system fail with the error:

 coherent.deps main 🐚 twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
ERROR    InvalidDistribution: Metadata is missing required fields: Name, Version.                                                                  
         Make sure the distribution includes the files where those fields are specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2, 
         2.0, 2.1, 2.2, 2.3.             

The error message "missing required fields" appears to be incorrect. The fields are there.

 dist main 🐚 unzip -q *.whl; cat *.dist-info/METADATA
Metadata-Version: 2.4
Name: coherent.deps
Version: 0.2.1
Author-Email: "Jason R. Coombs" <[email protected]>
License-Expression: MIT
Summary: Utilities for resolving imports to dependencies.
Requires-Python: >= 3.8
Requires-Dist: tqdm
Requires-Dist: jaraco.ui
Requires-Dist: coherent.deps
Requires-Dist: jaraco.context
Requires-Dist: jaraco.collections
Requires-Dist: jaraco.mongodb
Requires-Dist: keyring
Requires-Dist: tempora
Requires-Dist: jaraco.compat
Requires-Dist: jaraco.functools
Requires-Dist: more-itertools
Requires-Dist: requests
Requires-Dist: requests-file
Requires-Dist: requests-toolbelt
Requires-Dist: retry-requests
Requires-Dist: zipp
Provides-Extra: doc
Provides-Extra: test
Project-URL: Source, https://github.com/coherent-oss/coherent.deps
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only

According to the spec tools should warn (but presumably not error) if the version is a minor increment higher than the highest supported.

Please list the steps required to reproduce this behaviour

  1. git clone https://github.com/coherent-oss/coherent.deps; cd coherent.deps
  2. pipx run coherent.cli build
  3. pipx run twine upload dist/*

Anything else you'd like to mention?

No response

@jaraco jaraco added the bug label Sep 6, 2024
@jaraco
Copy link
Member Author

jaraco commented Sep 6, 2024

Relevant is this comment about supporting pkg_info>=1.11, which seems to address this issue.

@jaraco
Copy link
Member Author

jaraco commented Sep 6, 2024

Twine is pinned against pkg_info 1.11, so is hard-blocked against supporting this new metadata version. #1123 proposes to unblock it, but that PR has languished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant