Detecting rst errors when uploading to pypi

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 I've checked the README.rst with restview, rst2html, and collective.showdocs and they all render the RST just fine. 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... 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. Thanks, John

On Sat, Dec 27, 2014 at 11:26 PM, John Anderson <sontek@gmail.com> 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
I've checked the README.rst with restview, rst2html, and collective.showdocs and they all render the RST just fine.
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...
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.
I run: setup.py --long-description and pipe the output into a ReST processor to check for errors. (I use rst2, https://pypi.python.org/pypi/zc.rst2, which is a thin but convenient wrapper around docutils for converting ReST to various formats.) Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton

Jim Fulton schreef op 28-12-14 om 16:33:
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. I run:
setup.py --long-description
and pipe the output into a ReST processor to check for errors.
Blowing my own horn here... :-) If you install zest.releaser (which many people use to release their packages to save them lots of manual work), as an added bonus you get the "longtest" script. This does exactly what Jim suggests: it takes the long description, sends it through docutils and even opens it for you in your browser. Easiest way to check for errors :-) See http://zestreleaser.readthedocs.org/ Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout@vanrees.org http://www.nelen-schuurmans.nl/ "Learning history by destroying artifacts is a time-honored atrocity"

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 https://pypi.python.org/pypi/pyramid_celery/1.4? 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...
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

On Sun, Dec 28, 2014 at 9:02 AM, Marius Gedminas <marius@gedmin.as> wrote:
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 https://pypi.python.org/pypi/pyramid_celery/1.4?
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...
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.
I found the error was a .. code-block:: with no language, I fixed the README with this commit: https://github.com/sontek/pyramid_celery/commit/fb69dd44143a5b030b48346e6322... restview with --pypi-strict doesn't detect this (but maybe it should?). I even tried ripping the source code from pypi directly to catch the error: https://gist.github.com/sontek/e58c1cf82931e1478cd2 Using it: python setup.py --long-description | python check_readme.py but even that didn't cause the error, I assume because I have a more modern version of pygments.

It has been a while since Pygments was updated in that environment, so I've updated it. The PyPI code required a language argument, so I fixed that as well. Richard On Mon Dec 29 2014 at 10:54:50 AM John Anderson <sontek@gmail.com> wrote:
On Sun, Dec 28, 2014 at 9:02 AM, Marius Gedminas <marius@gedmin.as> wrote:
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 https://pypi.python.org/pypi/pyramid_celery/1.4?
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.
I found the error was a .. code-block:: with no language, I fixed the README with this commit:
https://github.com/sontek/pyramid_celery/commit/ fb69dd44143a5b030b48346e6322845194a690fe
restview with --pypi-strict doesn't detect this (but maybe it should?). I even tried ripping the source code from pypi directly to catch the error:
https://gist.github.com/sontek/e58c1cf82931e1478cd2
Using it:
python setup.py --long-description | python check_readme.py
but even that didn't cause the error, I assume because I have a more modern version of pygments. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig

I've confirmed that the bug I was experiencing is no longer a problem. Thanks! On Sun, Dec 28, 2014 at 8:46 PM, Richard Jones <richard@python.org> wrote:
It has been a while since Pygments was updated in that environment, so I've updated it. The PyPI code required a language argument, so I fixed that as well.
Richard
On Mon Dec 29 2014 at 10:54:50 AM John Anderson <sontek@gmail.com> wrote:
On Sun, Dec 28, 2014 at 9:02 AM, Marius Gedminas <marius@gedmin.as> wrote:
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 https://pypi.python.org/pypi/pyramid_celery/1.4?
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.
I found the error was a .. code-block:: with no language, I fixed the README with this commit:
https://github.com/sontek/pyramid_celery/commit/ fb69dd44143a5b030b48346e6322845194a690fe
restview with --pypi-strict doesn't detect this (but maybe it should?). I even tried ripping the source code from pypi directly to catch the error:
https://gist.github.com/sontek/e58c1cf82931e1478cd2
Using it:
python setup.py --long-description | python check_readme.py
but even that didn't cause the error, I assume because I have a more modern version of pygments. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig
participants (5)
-
Jim Fulton
-
John Anderson
-
Marius Gedminas
-
Reinout van Rees
-
Richard Jones