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:
parent
5e1db02519
commit
e030af6056
16
pep-0503.txt
16
pep-0503.txt
|
@ -32,7 +32,7 @@ the top level URL that all additional URLs are below. The API is named the
|
||||||
``https://pypi.org/simple/``.
|
``https://pypi.org/simple/``.
|
||||||
|
|
||||||
.. note:: All subsequent URLs in this document will be relative to this base
|
.. 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/``.
|
``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
|
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>``
|
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
|
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
|
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
|
href attribute **MUST** be a URL that links to the location of the file for
|
||||||
attribute **MUST** be an URL that links to the location of the file for
|
download, and the text of the anchor tag **MUST** match the final path
|
||||||
download. The URL **SHOULD** include a hash in the form of an URL fragment with
|
component (the filename) of the URL. The URL **SHOULD** include a hash in the
|
||||||
the following syntax: ``#<hashname>=<hashvalue>``, where ``<hashname>`` is the
|
form of a URL fragment with the following syntax: ``#<hashname>=<hashvalue>``,
|
||||||
lowercase name of the hash function (such as ``sha256``) and ``<hashvalue>`` is
|
where ``<hashname>`` is the lowercase name of the hash function (such as
|
||||||
the hex encoded digest.
|
``sha256``) and ``<hashvalue>`` is the hex encoded digest.
|
||||||
|
|
||||||
In addition to the above, the following constraints are placed on the API:
|
In addition to the above, the following constraints are placed on the API:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue