PEP 665: make `filename` required

This commit is contained in:
Brett Cannon 2021-11-11 19:35:37 -08:00
parent 6df0c1d962
commit 7d90a862cb
1 changed files with 10 additions and 11 deletions

View File

@ -401,18 +401,13 @@ alternative means (e.g. on the file system in a cache directory).
``package._name_._version_.filename``
-------------------------------------
A string representing the file name to be used on behalf of the URL
specified in ``url``.
This field is provided in case the URL specified in ``url`` has an
opaque file name compared to what the actual file name would be for
installation purposes. If this key is unset then the file name is to
be taken from ``url``.
Lockers SHOULD provide an accurate value for this field if ``url``
does not. This helps facilitate connecting which file the hashes
(discussed below) are for.
This field is **required**.
A string representing the name of the file as represented by an entry
in the array. This field is required to simplify installers as the
file name is required to resolve wheel tags derived from the file
name. It also guarantees that the association of the array entry to
the file it is meant for is always clear.
``package._name_._version_.direct``
-----------------------------------
@ -476,21 +471,25 @@ Example
[[package.attrs."21.2.0"]]
url = "https://files.pythonhosted.org/packages/20/a9/ba6f1cd1a1517ff022b35acd6a7e4246371dfab08b8e42b829b6d07913cc/attrs-21.2.0-py2.py3-none-any.whl"
filename = "attrs-21.2.0-py2.py3-none-any.whl"
hashes.sha256 = "149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"
[[package.mousebender."2.0.0"]]
url = "https://files.pythonhosted.org/packages/f4/b3/f6fdbff6395e9b77b5619160180489410fb2f42f41272994353e7ecf5bdf/mousebender-2.0.0-py3-none-any.whl"
filename = "mousebender-2.0.0-py3-none-any.whl"
hashes.sha256 = "a6f9adfbd17bfb0e6bb5de9a27083e01dfb86ed9c3861e04143d9fd6db373f7c"
requires = ["attrs", "packaging"]
[[package.packaging."20.9"]]
url = "https://files.pythonhosted.org/packages/3e/89/7ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af/packaging-20.9-py2.py3-none-any.whl"
filename = "packaging-20.9-py2.py3-none-any.whl"
hashes.blake-256 = "3e897ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af"
hashes.sha256 = "67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"
requires = ["pyparsing"]
[[package.pyparsing."2.4.7"]]
url = "https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl"
filename = "pyparsing-2.4.7-py2.py3-none-any.whl"
hashes.sha256="ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"