PEP 503: Reword to match pip’s URL lookup behavior (#962)

* Reword PEP 503 to match pip's URL lookup behavior

Clarify that the "filename" displayed in the anchor tag refers to the
final path component of the URL (instead of, say, the filename parameter
in the HTTP Content-Disposition header).

This matches pip's behavior: The URL's final path component is used to
determine the artifact's name (for selection), and its filename after
download.

* Replace "an URL" with "a URL"
This commit is contained in:
Tzu-ping Chung 2019-10-11 19:15:25 +08:00 committed by Nick Coghlan
parent 5e1db02519
commit e030af6056
1 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@ the top level URL that all additional URLs are below. The API is named the
``https://pypi.org/simple/``.
.. note:: All subsequent URLs in this document will be relative to this base
URL (so given PyPI's URL, an URL of ``/foo/`` would be
URL (so given PyPI's URL, a URL of ``/foo/`` would be
``https://pypi.org/simple/foo/``.
@ -52,14 +52,14 @@ link to the URL for that particular project. As an example::
Below the root URL is another URL for each individual project contained within
a repository. The format of this URL is ``/<project>/`` where the ``<project>``
is replaced by the normalized name for that project, so a project named
"HolyGrail" would have an URL like ``/holygrail/``. This URL must respond with
"HolyGrail" would have a URL like ``/holygrail/``. This URL must respond with
a valid HTML5 page with a single anchor element per file for the project. The
text of the anchor tag **MUST** be the filename of the file and the href
attribute **MUST** be an URL that links to the location of the file for
download. The URL **SHOULD** include a hash in the form of an URL fragment with
the following syntax: ``#<hashname>=<hashvalue>``, where ``<hashname>`` is the
lowercase name of the hash function (such as ``sha256``) and ``<hashvalue>`` is
the hex encoded digest.
href attribute **MUST** be a URL that links to the location of the file for
download, and the text of the anchor tag **MUST** match the final path
component (the filename) of the URL. The URL **SHOULD** include a hash in the
form of a URL fragment with the following syntax: ``#<hashname>=<hashvalue>``,
where ``<hashname>`` is the lowercase name of the hash function (such as
``sha256``) and ``<hashvalue>`` is the hex encoded digest.
In addition to the above, the following constraints are placed on the API: