From e030af605632431522279a85627f65282f2eb64e Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 11 Oct 2019 19:15:25 +0800 Subject: [PATCH] =?UTF-8?q?PEP=20503:=20Reword=20to=20match=20pip=E2=80=99?= =?UTF-8?q?s=20URL=20lookup=20behavior=20(#962)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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" --- pep-0503.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pep-0503.txt b/pep-0503.txt index 3b7087113..e74979f04 100644 --- a/pep-0503.txt +++ b/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/``. .. 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 ``//`` where the ```` 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: ``#=``, where ```` is the -lowercase name of the hash function (such as ``sha256``) and ```` 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: ``#=``, +where ```` is the lowercase name of the hash function (such as +``sha256``) and ```` is the hex encoded digest. In addition to the above, the following constraints are placed on the API: