warehouse icon indicating copy to clipboard operation
warehouse copied to clipboard

Include `readme_renderer` errors in error response when rendering fails

Open di opened this issue 1 month ago • 0 comments

What's the problem this feature will solve? In #18968 we had an example of a rST project description that failed to render, but the error message that PyPI emitted did not contain the rendering error.

Describe the solution you'd like The readme_renderer project supports providing a warning stream to the render call. E.g., this is how twine gets errors from the renderer. We should also use the warning stream to provide a more detailed error message.

Additional context Usage of the stream parameter in twine:

  • https://github.com/pypa/twine/blob/040a0f275ae763644a7e6ad6ccf5230084f61b16/twine/commands/check.py#L140-L151
  • https://github.com/pypa/twine/blob/040a0f275ae763644a7e6ad6ccf5230084f61b16/twine/commands/check.py#L102-L104

di avatar Oct 30 '25 17:10 di