Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-requires-python attribute to file links (PEP 503) #56

Merged
merged 3 commits into from
Jul 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pep-0503.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ In addition to the above, the following constraints are placed on the API:
a value of either ``true`` or ``false`` to indicate whether or not there is a
GPG signature. Repositories that do this **SHOULD** include it on every link.

* A repository **MAY** include a ``data-requires-python`` attribute on a file
link. This exposes the *Requires-Python* metadata field, specified in PEP 345,
for the corresponding release. Where this is present, installer tools
**SHOULD** ignore the download when installing to a Python version that
doesn't satisfy the requirement. For example::

<a href="..." data-requires-python="&gt;=3">...</a>

In the attribute value, < and > have to be HTML encoded as ``&lt;`` and
``&gt;``, respectively.

Normalized Names
----------------
Expand All @@ -111,6 +121,11 @@ can be implemented in Python with the ``re`` module::
def normalize(name):
return re.sub(r"[-_.]+", "-", name).lower()

Changes
-------

* The optional ``data-requires-python`` attribute was added in July 2016.


Copyright
=========
Expand Down