Skip to content

Commit

Permalink
Add data-requires-python attribute to file links (PEP 503) (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver authored and dstufft committed Jul 22, 2016
1 parent 8eff806 commit a767f90
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit a767f90

Please sign in to comment.