twine icon indicating copy to clipboard operation
twine copied to clipboard

Does twine treat long_description as a mandatory field?

Open achantavy opened this issue 3 years ago • 1 comments

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 https://github.com/pypa/twine/issues/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.

achantavy avatar Dec 16 '22 23:12 achantavy

At first glance, I think this might be a duplicate of https://github.com/pypa/twine/issues/908 (which I spent some time digging into, but needs more investigation).

bhrutledge avatar Dec 18 '22 12:12 bhrutledge

  1. Is long_description a mandatory field?

According to the spec, it is not.

Concur this issue is essentially the same as #908.

jaraco avatar May 02 '24 15:05 jaraco