I may be missing some history here, but pip seems to use the download URL basename as the candidate filename for PEP 691 JSON entries.
This is probably niche, since PyPI URLs appear to end with the distribution filename. but PEP 691 defines filename separately from url, and its FAQ notes that it is not clear whether repositories always expose the filename as the last part of the URL. 1
with an entry like this:
{
"filename": "simplewheel-1.0-py2.py3-none-any.whl",
"url": "/download/simplewheel",
"hashes": {}
}
pip seems to treat the URL basename simplewheel as the filename and skips the entry as not a file before downloading, despite the valid JSON filename. the same wheel installs when the URL ends with the wheel filename.
should pip use the JSON filename field for candidate filename detection in this case, or is relying on the URL basename intentional?
I may be missing some history here, but pip seems to use the download URL basename as the candidate filename for PEP 691 JSON entries.
This is probably niche, since PyPI URLs appear to end with the distribution filename. but PEP 691 defines
filenameseparately fromurl, and its FAQ notes that it is not clear whether repositories always expose the filename as the last part of the URL. 1with an entry like this:
{ "filename": "simplewheel-1.0-py2.py3-none-any.whl", "url": "/download/simplewheel", "hashes": {} }pip seems to treat the URL basename
simplewheelas the filename and skips the entry as not a file before downloading, despite the valid JSON filename. the same wheel installs when the URL ends with the wheel filename.should pip use the JSON filename field for candidate filename detection in this case, or is relying on the URL basename intentional?
Footnotes
PEP 691 - why-include-the-filename-when-the-url-has-it-already) ↩