Official support for markdown and plain text descriptions #169
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #166.
Until recently, PyPI only supported rst descriptions, falling back to plain text if the rst was invalid. Now a new metadata field
Description-Content-Type
lets us specify whether the description is rst, markdown or plain text. This new code uses that, picking the content type based on the file extension (.rst
,.md
or.txt
). If the extension is something else, Flit will warn the user and leave the field unset, so it's up to PyPI what to do with it.Markdown support has been a secret feature of Flit for some time, by using pandoc to convert markdown to rst (thanks @Carreau!). This makes it an official feature, and gets rid of the code to call pandoc, since PyPI can now handle markdown natively.