Open brettcannon opened 4 years ago
BTW this page technically violates PEP 503 due to the CDATA not matching the project name.
@pradyunsg where is the parsing code in pip for --index-url
? I want to see how permissive it is of what's in the CDATA.
@pradyunsg where is the parsing code in pip for
--index-url
?
pip._internal.index.collector:parse_links
(line 352, as of today on master).
I want to see how permissive it is of what's in the CDATA.
pip doesn't look up what's in the CDATA today. I'm onboard for making it start warning about such discrepancies, and after a 2-release deprecation cycle, rejecting such pages.
Interesting that pip doesn't look at the CDATA as that seems to be the only way to potentially differentiate between projects who have a name clash when it comes to name normalization for the URL (although that is obviously a "don't do that" kind of thing if your names differ only by symbols that will be stripped out 😉 ). It also makes searching near impossible based on people specifying the full name and not the normalized name.
Really shows how little people use the index part of PEP 503.
projects who have a name clash when it comes to name normalization for the URL
Well... PyPI doesn't allow such projects so we never hit that. :)
I stand corrected! I just spent some time thinking about this, saw https://github.com/python-poetry/poetry/issues/1983 and realized that pip does indeed perform these checks, but only when the file extension is .whl
. That's likely because we don't have any standard way to get the name out of the source distributions.
Y
https://tensorflow.pypi.thoth-station.ninja/index/manylinux2010/AVX2/simple/ has CDATA with trailing slashes. I have not tested to see if this is page is supported by pip.