mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
When the `base_url` is a `[]` protected IPv6 address, the `_clean_link()` function converts `[` to `%5B` and `]` to `%5D`, which renders the `base_url` invalid. For example: ``` Starting new HTTP connection (1): fd00:0:0:236:💯8181 http://fd00:0:0:236:💯8181 "GET /os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt HTTP/1.1" 200 None Setting setuptools==40.6.3 (from -c http://[fd00:0:0:236::100]:8181/os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt (line 204)) extras to: () Looking in indexes: http://[fd00:0:0:236::100]:8181/simple Collecting setuptools==40.6.3 (from -c http://[fd00:0:0:236::100]:8181/os-releases/19.0.0.0b1/opensuse_leap-42.3-x86_64/requirements_absolute_requirements.txt (line 204)) 1 location(s) to search for versions of setuptools: * http://[fd00:0:0:236::100]:8181/simple/setuptools/ Getting page http://[fd00:0:0:236::100]:8181/simple/setuptools/ http://fd00:0:0:236:💯8181 "GET /simple/setuptools/ HTTP/1.1" 200 376 Analyzing links from page http://[fd00:0:0:236::100]:8181/simple/setuptools/ _package_versions: link = http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00:0:0: 236::100]:8181/simple/setuptools/) _link_package_versions: link = http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00 :0:0:236::100]:8181/simple/setuptools/) Found link http://%5bfd00:0:0:236::100%5d:8181/packages/opensuse_leap-42.3-x86_64/setuptools/setuptools-40.6.3-py2.py3-none-any.whl#md5=389d3cd088d7afec3a1133b1d8e15df0 (from http://[fd00:0:0:236::100]:8181/ simple/setuptools/), version: 40.6.3 Using version 40.6.3 (newest of versions: 40.6.3) Could not install packages due to an EnvironmentError. InvalidURL: Failed to parse: %5bfd00:0:0:236::100%5d:8181 ``` This change uses the vendored `urllib` library to split the host part off of the url before URL quoting only the path part. Fixes: #6285 Signed-off-by: Nicolas Bock <nicolasbock@gmail.com> |
||
---|---|---|
.. | ||
.gitignore | ||
65a44975-f650-4a38-a7d9-5cfceaebf10d.trivial | ||
529a7aae-8f0b-4342-b8ef-7f9a85de2a90.trivial | ||
1219.bugfix | ||
4195.bugfix | ||
5060.feature | ||
5443.feature | ||
5499.feature | ||
5549.feature | ||
5749.feature | ||
5889.bugfix | ||
5892.bugfix | ||
6054.bugfix | ||
6285.bugfix | ||
6290.feature | ||
6295.bugfix | ||
6298.feature | ||
6305.feature | ||
6312.bugfix | ||
6314.feature | ||
6370.bugfix | ||
85016e72-3c01-455a-ad4e-e25f676c7381.trivial | ||
_template.rst | ||
a1440b03-c0c6-4176-8e00-732517bed87b.trivial | ||
b310bc35-7843-42b1-a766-72112705c629.trivial | ||
e1f5fdfc-64e5-468a-a688-c4a5915aaa35.trivial |