[Distutils] Detecting rst errors when uploading to pypi

Marius Gedminas marius at gedmin.as
Sun Dec 28 18:02:07 CET 2014

On Sat, Dec 27, 2014 at 08:26:50PM -0800, John Anderson wrote:
> Hey, I'm trying to get my README to render properly on pypi but I haven't
> found a way to detect the errors pypi is experiencing.
> The package I'm trying to upload is here:
> https://pypi.python.org/pypi/pyramid_celery

Are you talking about
https://pypi.python.org/pypi/pyramid_celery/2.0.0-rc2 or

The first looks fine now (have you found the error and fixed it
already?) while the second looks like it uses some kind of Markdown
instead of ReStructuredText:

``` python
    pyramid.includes = pyramid_celery

> I've checked the README.rst with restview, rst2html, and
> collective.showdocs and they all render the RST just fine.

Just to be sure, did you try restview's --pypi-strict mode?

> It seems like I'm not the only one having this issue:
> https://bitbucket.org/pypa/pypi/issue/161/rest-formatting-fails-and-there-is-no-way
> So what is the recommended route for debugging the problem?  I would really
> like to fix it but without know the problem I would just to make random
> guesses.

restview --long-description is what I use (in the source tree with a
setup.py: this runs setup.py --long-description and parses the output in
--pypi-strict mode).

If that fails to find the error, I try to copy & paste the
long_description text from PyPI into a text file and use restview
--pypi-strict directly.

If that fails, I end up bisecting the long_description text in the web
form, to see where it starts failing.

If it's not my package and I can't edit the long_description on the web,
I tend to give up.

Marius Gedminas
"Nobody will ever need more than 640k RAM!"
                                -- Bill Gates, 1981
"Windows 95 needs at least 8 MB RAM."
                                -- Bill Gates, 1996
"Nobody will ever need Windows 95."
                                -- logical conclusion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20141228/90019d8f/attachment-0001.sig>

More information about the Distutils-SIG mailing list