If the source README.rst contains header only, e.g.:
The twine check command claims the markup is invalid for no reason:
twine check 'dist/*'
Checking distribution dist/foo-0.0.1.tar.gz: Failed
The project's long_description has invalid markup which will not be rendered on PyPI. The following syntax errors were detected:
Without listing any errors. Thats the end of stdout/stderr.
If I change the README.rst by adding just single letter at end, e.g.:
or clear it contents everything is ok:
twine check 'dist/*'
Checking distribution dist/grot-0.0.1.tar.gz: Passed
I debugged it a bit. And got to the line 99 in site-packages/readme_renderer/rst.py:
rendered = parts.get("docinfo", "") + parts.get("fragment", "")
and the rendered string is empty. (both docinfo and fragment contain empty strings).
It corrupts the later if:
if rendered:
return clean(rendered)
else:
return None
...causing render function return None, which is interpreted by twine.check as error, but no warnings/errors are collected by used stream.
If the source README.rst contains header only, e.g.:
Header ======The
twine checkcommand claims the markup is invalid for no reason:Without listing any errors. Thats the end of
stdout/stderr.If I change the
README.rstby adding just single letter at end, e.g.:Header ====== aor clear it contents everything is ok:
I debugged it a bit. And got to the line 99 in
site-packages/readme_renderer/rst.py:rendered = parts.get("docinfo", "") + parts.get("fragment", "")and the
renderedstring is empty. (bothdocinfoandfragmentcontain empty strings).It corrupts the later
if:...causing
renderfunction returnNone, which is interpreted by twine.check as error, but no warnings/errors are collected by usedstream.