Page MenuHomePhabricator

Pypi upload fails after documentation update
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

Pypi upload fails after documentation update of README.rst and ROADMAP.rst.

What happens?:

The description failed to render in the default format of reStructuredText.

D:\pwb\GIT\core>twine upload dist/* --repository testpypi --verbose
Uploading distributions to https://test.pypi.org/legacy/
INFO     dist\pywikibot_core-8.0.0-py3-none-any.whl (679.6 KB)
INFO     dist\pywikibot-core-8.0.0.tar.gz (584.2 KB)
INFO     Querying keyring for username
Enter your username: <redacted>
INFO     Querying keyring for password
Enter your password:
INFO     username: <redacted>
INFO     password: <hidden>
Uploading pywikibot_core-8.0.0-py3-none-any.whl
100% ---------------------------------------- 729.7/729.7 kB • 00:00 • 1.1 MB/s
INFO     Response from https://test.pypi.org/legacy/:
         400 The description failed to render in the default format of
         reStructuredText. See
         https://test.pypi.org/help/#description-content-type for more
         information.
INFO     <html>
          <head>
           <title>400 The description failed to render in the default format of
         reStructuredText. See
         https://test.pypi.org/help/#description-content-type for more
         information.</title>
          </head>
          <body>
           <h1>400 The description failed to render in the default format of
         reStructuredText. See
         https://test.pypi.org/help/#description-content-type for more
         information.</h1>
           The server could not comply with the request since it is either
         malformed or otherwise incorrect.<br/><br/>
         The description failed to render in the default format of
         reStructuredText. See
         https://test.pypi.org/help/#description-content-type for more
         information.


          </body>
         </html>
ERROR    HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
         The description failed to render in the default format of
         reStructuredText. See
         https://test.pypi.org/help/#description-content-type for more
         information.

Replacing .. code:: with :: does not help.

Software version:
Pywikibot 8.0.0

Other information:
Upload still works for Pywikibot 7.7: https://pypi.org/project/pywikibot/#history

@KBach: any idea?

Related Objects

StatusSubtypeAssignedTask
ResolvedReleaseXqt
ResolvedBUG REPORTXqt

Event Timeline

I checked the source:

D:\pwb\GIT\core>twine check dist/*
Checking dist\pywikibot_core-8.0.0-py3-none-any.whl: FAILED
ERROR    `long_description` has syntax errors in markup and would not be
         rendered on PyPI.
         line 174: Warning: Definition list ends without a blank line;
         unexpected unindent.
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.
Checking dist\pywikibot-core-8.0.0.tar.gz: FAILED
ERROR    `long_description` has syntax errors in markup and would not be
         rendered on PyPI.
         line 174: Warning: Definition list ends without a blank line;
         unexpected unindent.
WARNING  `long_description_content_type` missing. defaulting to `text/x-rst`.

D:\pwb\GIT\core>

Found it:

D:\pwb\GIT\core>twine check dist/*
Checking dist\pywikibot-8.0.0.dev0-py3-none-any.whl: PASSED
Checking dist\pywikibot-8.0.0.dev0.tar.gz: PASSED

Found it:

D:\pwb\GIT\core>twine check dist/*
Checking dist\pywikibot-8.0.0.dev0-py3-none-any.whl: PASSED
Checking dist\pywikibot-8.0.0.dev0.tar.gz: PASSED

Are you able to tell what exactly was the problem?

Change 880881 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Fix setup.read_desc() regex

https://gerrit.wikimedia.org/r/880881

Change 880881 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Fix setup.read_desc() regex

https://gerrit.wikimedia.org/r/880881