Skip to content

Missing long_description sometimes results in "UNKNOWN" project description on Warehouse #3473

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

Closed
keysmashes opened this issue Mar 30, 2018 · 6 comments
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this.

Comments

@keysmashes
Copy link

Some packages get a nice banner when there's no long_description (example):

image

but some just get "UNKNOWN" (example on testPyPI):

image

The package with the banner only has an sdist, the one with UNKNOWN has both an sdist and a wheel, and the wheel was uploaded first. Both were uploaded within the last couple of days.

@dstufft
Copy link
Member

dstufft commented Mar 30, 2018

Sounds like a bug in the stripping of UNKNOWN during upload.

@theacodes
Copy link
Contributor

pypa/readme_renderer#69 will help with this once it's merged/released.

@berkerpeksag
Copy link
Contributor

This looks like a duplicate of (or related to) #69.

@di
Copy link
Member

di commented Apr 2, 2018

@anowlcalledjosh How did you generate the wheel for this release? It's a little weird because it contains a description with extra newlines at the end:

$ cat some-0.2.dist-info/DESCRIPTION.rst
UNKNOWN


$ cat some-0.2.dist-info/METADATA
Metadata-Version: 2.0
Name: some
Version: 0.2
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN

UNKNOWN

which is throwing off this check: https://github.com/pypa/warehouse/blob/090c9c9f59941d819092d3f8ca555dc01400b452/warehouse/forklift/legacy.py#L721-L726

@brainwane brainwane added help needed We'd love volunteers to advise on or help fix/implement this. feature request labels Apr 2, 2018
@brainwane brainwane added this to the 6. Post Legacy Shutdown milestone Apr 2, 2018
@keysmashes
Copy link
Author

@di That particular release was with an almost empty setup.py (and no setup.cfg). I reproduced it with the following package versions:

  • pip 9.0.3
  • pkg-resources 0.0.0
  • setuptools 39.0.1
  • wheel 0.31.0

and a setup.py that looks like this:

from setuptools import setup

setup(
    name="some-test",
    version="0.0.1",
)

and the command python setup.py bdist_wheel.

(With wheel 0.31.0, the DESCRIPTION.rst file is not generated any more, but METADATA still ends with a couple of blank lines.)

If I specify a single-line long_description in setup.py, the generated description still ends with two blank lines; however, giving a longer long_description, for example:

    long_description="""foo bar

    this is a test

    it has multiple lines"""

results in only a single trailing blank line:

$ cat dist/some_test-0.0.1.dist-info/METADATA
Metadata-Version: 2.0
Name: some-test
Version: 0.0.1
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN

foo bar

this is a test

it has multiple lines

@di
Copy link
Member

di commented Apr 2, 2018

Note: I fixed this for all new uploads going forward in #3524, but existing affected releases will still show UNKNOWN until #69 is addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help needed We'd love volunteers to advise on or help fix/implement this.
Projects
None yet
Development

No branches or pull requests

6 participants