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

Does twine treat long_description as a mandatory field? #960

Closed
achantavy opened this issue Dec 16, 2022 · 2 comments
Closed

Does twine treat long_description as a mandatory field? #960

achantavy opened this issue Dec 16, 2022 · 2 comments

Comments

@achantavy
Copy link

achantavy commented Dec 16, 2022

Your Environment

  1. Your operating system:

Originally caught on GitHub Actions Publish to PyPI, but locally repro'd on my OSX laptop.

  1. Version of python you are running:

3.10.8

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

pip install twine

  1. Version of twine you have installed (include complete output of):
twine --version

4.0.2

  1. Which package repository are you targeting?

PyPI

If you're having issues uploading a specific package, you must include a copy of the following:

  • The package's PKG-INFO file

PKG-INFO.txt

The Issue

I noticed today that my Github action to publish to pypi started failing with

ERROR    `long_description` has syntax errors in markup and would not be rendered on PyPI.
         No content rendered from RST source.

This was confusing for me because

After coming across #454, I tried to repro the issue locally and was able to do so:

Steps to Reproduce

I am able to reproduce this locally using the config mentioned above.

  1. Clone lyft/cartography at 36c6ed3
  2. Build my project with python -m build --sdist --wheel --outdir dist/ .
  3. Run twine 4.0.2 against dist with twine check dist/*.

Steps I took to fix:

I added a long_description field to setup.py and twine check now passes:
Screenshot 2022-12-16 at 3 34 42 PM

Questions

  1. Is long_description a mandatory field?
  2. If so, would it be possible to adjust the error message so that it says long_description is mandatory, instead of saying that "long_description has syntax errors"?

Thank you for your time! Please let me know if I missed something silly in my own configs.

@bhrutledge
Copy link
Contributor

At first glance, I think this might be a duplicate of #908 (which I spent some time digging into, but needs more investigation).

aforren1 added a commit to aforren1/Psychtoolbox-3 that referenced this issue Mar 17, 2023
… tools.

Unclear whether this was intentional on the python tooling side, but
twine (the tool that uploads packages to PyPI) now fails if the
long_description is not set. See pypa/twine#960
for details.
anthrotype added a commit to anthrotype/brotli that referenced this issue Sep 6, 2023
twine (the tool we use to upload packages to PyPI) is currently failing if the long_description (used to render a project's page on PyPI website) is not set. Somehow it complains that it is not well formatted reStructuredText, but it's simply empty...
This looks like a bug, or bad interaction between twince and setuptools, because the field is technically optional.
Also see pypa/twine#960 and pypa/twine#908.

This issue is currently preventing the upload of newly built Brotli v1.1.0 Python wheels to PyPI:
google/brotli-wheels#18 (comment)

Anyway, we may well set the long_description to the content of the README.md file, as it's customary for python projects.
eustas pushed a commit to google/brotli that referenced this issue Sep 7, 2023
twine (the tool we use to upload packages to PyPI) is currently failing if the long_description (used to render a project's page on PyPI website) is not set. Somehow it complains that it is not well formatted reStructuredText, but it's simply empty...
This looks like a bug, or bad interaction between twince and setuptools, because the field is technically optional.
Also see pypa/twine#960 and pypa/twine#908.

This issue is currently preventing the upload of newly built Brotli v1.1.0 Python wheels to PyPI:
google/brotli-wheels#18 (comment)

Anyway, we may well set the long_description to the content of the README.md file, as it's customary for python projects.
aforren1 added a commit to aforren1/Psychtoolbox-3 that referenced this issue Dec 14, 2023
Unclear whether this was intentional on the python tooling side, but
twine (the tool that uploads packages to PyPI) now fails if the
long_description is missing. See pypa/twine#960
for details.
@jaraco
Copy link
Member

jaraco commented May 2, 2024

  1. Is long_description a mandatory field?

According to the spec, it is not.

Concur this issue is essentially the same as #908.

@jaraco jaraco closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants