pypa / readme_renderer

Safely render long_description/README files in Warehouse
Apache License 2.0
157 stars 88 forks source link

reStrustucturedText description error when language unknow, but valid rST #152

Closed scopatz closed 5 years ago

scopatz commented 5 years ago

Describe the bug

If the description keyword contains valid rST, such as:

.. code-block:: xonsh

    $ACTIVITIES = ['tag']
    $TAG_PUSH = False

PyPI will reject an upload of this source of this package with

Upload failed (400): The description failed to render in the default format of 
reStructuredText. See https://pypi.org/help/#description-content-type for more information.

The package may be uploaded if the above snippet is changed to:

.. code-block:: sh

    $ACTIVITIES = ['tag']
    $TAG_PUSH = False

Expected behavior

PyPI should either not care about the language of the code-block or give a more correct / descriptive error message, since the original snippet is valid rST.

di commented 5 years ago

Thanks for the report! Closing as a duplicate of #116, see https://github.com/pypa/readme_renderer/issues/116#issuecomment-492742548 specifically.

scopatz commented 5 years ago

Ahh thanks! This just shows again how bad github search really is :wink:.