Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for web proxies is broken in pip 20.3 #9190

Closed
japagetw opened this issue Nov 30, 2020 · 23 comments
Closed

Support for web proxies is broken in pip 20.3 #9190

japagetw opened this issue Nov 30, 2020 · 23 comments
Labels
C: network connectivity C: proxy Dealing with proxies and networking project: vendored dependency Related to a vendored dependency resolution: duplicate Duplicate of an existing issue/PR

Comments

@japagetw
Copy link

japagetw commented Nov 30, 2020

Environment

  • pip version: 20.3
  • Python version: 3.9.1rc1
  • OS: Windows 10 Enterprise Version 1909 (64-bit)

I am behind a corporate firewall with an authenticating proxy that requires both a user ID and a password.

Description

pip 20.2.4 supported the proxy but pip 20.3 does not. I tried both setting the environment variables and
using the --proxy command line argument, but neither worked in pip 20.3. pip 20.2.4 works fine even if
no --proxy argument is used and no proxy-related environment variables are set.

Expected behavior

pip 20.3 should support the proxy in the same way that pip 20.2.4 does.

How to Reproduce

See the output below. I set up a virtual environment, and updated pip to version 20.2.4, demonstrated
that there was no bug, then updated pip to version 20.3 and demonstrated the bug

Output

Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
C:\MISC>mkdir pipbug

C:\MISC>cd pipbug

C:\MISC\pipbug>python -m venv pipbug

C:\MISC\pipbug>dir
 Volume in drive C is Windows
 Volume Serial Number is 0CB7-E951

 Directory of C:\MISC\pipbug

11/30/2020  02:57 PM    <DIR>          .
11/30/2020  02:57 PM    <DIR>          ..
11/30/2020  02:57 PM    <DIR>          pipbug
               0 File(s)              0 bytes
               3 Dir(s)  122,653,765,632 bytes free

C:\MISC\pipbug>pipbug\Scripts\activate

(pipbug) C:\MISC\pipbug>pip list
Package    Version
---------- -------
pip        20.2.3
setuptools 49.2.1
WARNING: You are using pip version 20.2.3; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>python -m pip install -U "pip<20.3"
Collecting pip<20.3
  Using cached pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-20.2.4

(pipbug) C:\MISC\pipbug>pip install -U setuptools wheel
Collecting setuptools
  Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
  Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Installing collected packages: setuptools, wheel
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
Successfully installed setuptools-50.3.2 wheel-0.35.1
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>pip list
Package    Version
---------- -------
pip        20.2.4
setuptools 50.3.2
wheel      0.35.1
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>pip list -o
Package Version Latest Type
------- ------- ------ -----
pip     20.2.4  20.3   wheel
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>REM Call proxies.bat to set environment variables for proxy.

(pipbug) C:\MISC\pipbug>REM Certain items (<user>, <password>, and <domain>) have been redacted.

(pipbug) C:\MISC\pipbug>proxies <password>

(pipbug) C:\MISC\pipbug>set PIP_PROXY=http://<user>:<password>@proxy-west.<domain>.org:8080/

(pipbug) C:\MISC\pipbug>set FTP_PROXY=ftp://<user>:<password>@proxy-west.<domain>.org:8080/

(pipbug) C:\MISC\pipbug>set http_proxy=http://<user>:<password>@proxy-west.<domain>.org:8080/

(pipbug) C:\MISC\pipbug>set https_PROXY=https://<user>:<password>@proxy-west.<domain>.org:8080/

(pipbug) C:\MISC\pipbug>c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip
Collecting pip
  Using cached pip-20.3-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Successfully uninstalled pip-20.2.4
Successfully installed pip-20.3

(pipbug) C:\MISC\pipbug>pip list -o
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/

(pipbug) C:\MISC\pipbug>pip list -o --use-deprecated=legacy-resolver
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/

(pipbug) C:\MISC\pipbug>pip list -o --proxy <user>:<password>@proxy-west.<domain>.org:8080
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/

(pipbug) C:\MISC\pipbug>python -m pip install -U "pip<20.3"
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
ERROR: Could not find a version that satisfies the requirement pip<20.3
ERROR: No matching distribution found for pip<20.3

(pipbug) C:\MISC\pipbug>dir \misc\*pip*.py
 Volume in drive C is Windows
 Volume Serial Number is 0CB7-E951

 Directory of C:\misc

11/30/2020  09:46 AM         1,910,500 get-pip.py
05/14/2016  05:43 AM               805 piplist.py
               2 File(s)      1,911,305 bytes
               0 Dir(s)  122,641,879,040 bytes free

(pipbug) C:\MISC\pipbug>python c:\misc\get-pip.py "pip<20.3"
Collecting pip<20.3
  Using cached pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3
    Uninstalling pip-20.3:
      Successfully uninstalled pip-20.3
Successfully installed pip-20.2.4

(pipbug) C:\MISC\pipbug>pip list -o
Package Version Latest Type
------- ------- ------ -----
pip     20.2.4  20.3   wheel
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>deactivate
C:\MISC\pipbug>

@pradyunsg
Copy link
Member

Thanks for filing this!

Could you please provide the output of the pip list -o and pip install XYZ commands on pip 20.3 with -v, and post the output contrasting that with pip 20.2.* with -v?

@pradyunsg pradyunsg added C: network connectivity C: proxy Dealing with proxies and networking S: awaiting response Waiting for a response/more information labels Dec 1, 2020
@japagetw
Copy link
Author

japagetw commented Dec 1, 2020

Here is the requested output. I have removed more than 1000 uninteresting lines.

C:\MISC>cd pipbug

C:\MISC\pipbug>pipbug\Scripts\activate

(pipbug) C:\MISC\pipbug>pip list
Package    Version
---------- -------
pip        20.2.4
setuptools 50.3.2
wheel      0.35.1
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>pip list -o -v
1 location(s) to search for versions of setuptools:
* https://pypi.org/simple/setuptools/
1 location(s) to search for versions of wheel:
* https://pypi.org/simple/wheel/
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/wheel/
Fetching project page and analyzing links: https://pypi.org/simple/setuptools/
Getting page https://pypi.org/simple/setuptools/
Getting page https://pypi.org/simple/wheel/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Found index url https://pypi.org/simple
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/setuptools/" in the cache
Looking up "https://pypi.org/simple/wheel/" in the cache
Request header has "max_age" as 0, cache bypassed
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
Starting new HTTPS connection (2): pypi.org:443
Starting new HTTPS connection (3): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
https://pypi.org:443 "GET /simple/setuptools/ HTTP/1.1" 304 0
https://pypi.org:443 "GET /simple/wheel/ HTTP/1.1" 304 0
[1345 links were listed; I have removed most of them]
  Found link https://files.pythonhosted.org/packages/51/15/d31364732deb6e7d1490f8a08f011997b52b4b106d592d36e917404be613/wheel-0.1.tar.gz#sha256=2cc0dd3d9465ae323ad6e85fc9dc54ab3664da2c60ce42189b9ae4c44de7d8bd (from https://pypi.org/simple/wheel/), version: 0.1
  ...
  Found link https://files.pythonhosted.org/packages/3d/9d/1e313763bdfb6a48977b65829c6ce2a43eaae29ea2f907c8bbef024a7219/pip-0.2.tar.gz#sha256=88bb8d029e1bf4acd0e04d300104b7440086f94cc1ce1c5c3c31e3293aee1f81 (from https://pypi.org/simple/pip/), version: 0.2
  ...
  Skipping link: none of the wheel's tags match: py27-none-any: https://files.pythonhosted.org/packages/0b/86/3c1687aba2d15cec12ed2dc9bb5276e9fb6d3d43ce7376e91fabdb400c0a/wheel-0.8-py27-none-any.whl#sha256=583831383bdf191fac1953595b8d9ec704718eb22e322b6fd4e9449aacd91f2b (from https://pypi.org/simple/wheel/)
  ...
  Skipping link: none of the wheel's tags match: py27-none-any: https://files.pythonhosted.org/packages/98/53/d87853d5490feb0ec9295e645ce0fa631ed95c2020d3411103561563e045/wheel-0.9-py27-none-any.whl#sha256=c989d0fa556621341d46167389496e5c9191b5c4eb5a70d1190c473207ddd9c8 (from https://pypi.org/simple/wheel/)
  ...
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/77/38/90cae8fd99c5dc402d25930e1c91f5fcf6de5c8e982fd152a5a061e3df56/setuptools-0.6b1-py2.3.egg#sha256=ae0a6ec6090a92d08fe7f3dbf9f1b2ce889bce2a3d7724b62322a29b92cf93f0 (from https://pypi.org/simple/setuptools/)
  Found link https://files.pythonhosted.org/packages/28/46/8ebdfe69b7ad35adf20b0e9335a0ec5790f9999d7c99fe5d180a55f9f963/wheel-0.9.5-py2.py3-none-any.whl#sha256=2fafe3ab14e79a5cd4e3e3c8ec901a16e69ba9977ff528e1357afb79fd6adbf4 (from https://pypi.org/simple/wheel/), version: 0.9.5
  ...
  Found link https://files.pythonhosted.org/packages/85/37/7252beacf7e60cffe3bc5a97f94e3ccf22a927e87697d377cfe16abea7cf/wheel-0.35.0-py2.py3-none-any.whl#sha256=64a0d73747636637479b8b8741f9304bee7a568c80e4029eeb9529ef134b471d (from https://pypi.org/simple/wheel/) (requires-python:!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7), version: 0.35.0
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/b9/4c/1ccb5022fb94f3f8d5c90d2931e34d4208ea3aa0e7c4927d49c9e060e568/setuptools-0.6c8-py2.5.egg#sha256=e7ed68f6ec5ae8eb8197646fc5a7a32108be661bc588f3555240c6943ac55d1d (from https://pypi.org/simple/setuptools/)
  Found link https://files.pythonhosted.org/packages/c6/16/6475b142927ca5d03e3b7968efa5b0edd103e4684ecfde181a25f6fa2505/pip-7.0.0.tar.gz#sha256=7b46bfc1b95494731de306a688e2a7bc056d7fa7ad27e026908fb2ae67fed23d (from https://pypi.org/simple/pip/), version: 7.0.0
  Found link https://files.pythonhosted.org/packages/5b/e1/fa6dccd0d461520fbaa98d47cdf1ba26d5a2666e24b454d0e27387420e4b/wheel-0.35.0.tar.gz#sha256=625e645aae0706ad09690bded523196a065fbcf9afcdb2d713b59e01ef8699c0 (from https://pypi.org/simple/wheel/) (requires-python:!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7), version: 0.35.0
  Found link https://files.pythonhosted.org/packages/29/17/f98a2cb39bb5b40357fd54fba1dd105e224a447a91867ac5c4ef6f8f0191/setuptools-0.6c8.tar.gz#sha256=96667a84cd8c7af103ca07fe6b41f7c1494a0ab7300335f7ab18ab49c3203e37 (from https://pypi.org/simple/setuptools/), version: 0.6c8
  Found link https://files.pythonhosted.org/packages/5a/10/bb7a32c335bceba636aa673a4c977effa1e73a79f88856459486d8d670cf/pip-7.0.1-py2.py3-none-any.whl#sha256=d26b8573ba1ac1ec99a9bdbdffee2ff2b06c7790815211d0eb4dc1462a089705 (from https://pypi.org/simple/pip/), version: 7.0.1
  Found link https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl#sha256=497add53525d16c173c2c1c733b8f655510e909ea78cc0e29d374243544b77a2 (from https://pypi.org/simple/wheel/) (requires-python:!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7), version: 0.35.1
  Skipping link: unsupported archive format: .exe: https://files.pythonhosted.org/packages/da/1d/ec8ecc71d817000bfc86eaafe2af7984fe8a5c61c86abaf663bbef1ac7fa/setuptools-0.6c8.win32-py2.3.exe#sha256=01ef931a539882885ebc832d4d5c865ac78da775662046fe13c76cc9b51a4f6e (from https://pypi.org/simple/setuptools/)
  Found link https://files.pythonhosted.org/packages/4a/83/9ae4362a80739657e0c8bb628ea3fa0214a9aba7c8590dacc301ea293f73/pip-7.0.1.tar.gz#sha256=cfec177552fdd0b2d12b72651c8e874f955b4c62c1c2c9f2588cbdc1c0d0d416 (from https://pypi.org/simple/pip/), version: 7.0.1
  Found link https://files.pythonhosted.org/packages/83/72/611c121b6bd15479cb62f1a425b2e3372e121b324228df28e64cc28b01c2/wheel-0.35.1.tar.gz#sha256=99a22d87add3f634ff917310a3d87e499f19e663413a52eb9232c447aa646c9f (from https://pypi.org/simple/wheel/) (requires-python:!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7), version: 0.35.1
  Skipping link: unsupported archive format: .exe: https://files.pythonhosted.org/packages/fa/f1/c2553c8095a7d430b39669081acfa8afecff686682e9fec8df3403495cd3/setuptools-0.6c8.win32-py2.4.exe#sha256=1cbc564f92bcb57495aff4a8fbe6e7e60e8c06d8f761f6d5cec034b809e3c67f (from https://pypi.org/simple/setuptools/)
  ...
  Found link https://files.pythonhosted.org/packages/fe/cb/5c3ecf3866938e230be1b3d355ff9501f3f6b65ae5c583f88bf59855345f/setuptools-3.0.2.tar.gz#sha256=c6465e07ee77ff9c3ae85d505f85c4974bf005ad0eefa0775ab19eebf7edffb5 (from https://pypi.org/simple/setuptools/), version: 3.0.2
  Found link https://files.pythonhosted.org/packages/59/64/4718738ffbc22d98b5223dbd6c5bb87c476d83a4c71719402935170064c7/pip-20.2.3.tar.gz#sha256=30c70b6179711a7c4cf76da89e8a0f5282279dfb0278bec7b94134be92543b6d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.3
  Found link https://files.pythonhosted.org/packages/f1/ee/052f6fbd63664b9e8b8a5a1b6e667c078c54600319feafc7265e5a367cd2/setuptools-3.0.2.zip#sha256=c1b4719865b5cc05bd79022ab86b982586bb5eb20406eaa39286da50c62293fc (from https://pypi.org/simple/setuptools/), version: 3.0.2
  Found link https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d396a433/pip-20.2.4-py2.py3-none-any.whl#sha256=51f1c7514530bd5c145d8f13ed936ad6b8bfcb8cf74e10403d0890bc986f0033 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.4
  Found link https://files.pythonhosted.org/packages/94/ee/d2326117a111fb978cb1d6f2e62e5cf8a63f057e828145506e7b4a32d3fe/setuptools-3.1-py2.py3-none-any.whl#sha256=9779604672ce638b155bf0e99612e70ef54432e049494c05caa6269c1cd1bc68 (from https://pypi.org/simple/setuptools/), version: 3.1
  Found link https://files.pythonhosted.org/packages/0b/f5/be8e741434a4bf4ce5dbc235aa28ed0666178ea8986ddc10d035023744e6/pip-20.2.4.tar.gz#sha256=85c99a857ea0fb0aedf23833d9be5c40cf253fe24443f0829c7b472e23c364a1 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.4
  Found link https://files.pythonhosted.org/packages/9a/fc/46d5fa8dd1a60c0091a940d67724fd42b03a7866cde64ac921e2e2d7d6a6/setuptools-3.1.tar.gz#sha256=4438165bfc261552d85abc226f78c04597df40441f517d878aa3d9b8159341ea (from https://pypi.org/simple/setuptools/), version: 3.1
  Found link https://files.pythonhosted.org/packages/fb/46/26d13ba147ba430f9cda0d0cf599a041d142a5c8b1a90ff845ebce7fba0f/pip-20.3b1-py2.py3-none-any.whl#sha256=122fcd82deac1153c1699f29815bfab3f876e5bbe018cc2df1297f9802572a97 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3b1
  Found link https://files.pythonhosted.org/packages/96/c2/beaef5bdd2b706c6ffac24dd3be7e93f67733bfe4dff30372a0ac2b4de4e/setuptools-3.1.zip#sha256=c1d3ca4365e4d021458da8aeb2073c906049177660ff22df72d5fad377a7b416 (from https://pypi.org/simple/setuptools/), version: 3.1
  Found link https://files.pythonhosted.org/packages/7f/61/2da3c027ad7bd4bc87a3ee7e7160c93e7500dac3536e02ff93008e9b3460/pip-20.3b1.tar.gz#sha256=819c710a5c8d8c5e44695d03e51cb23b08c070e1ae6a5d6910a89e248e0ff29c (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3b1
  Found link https://files.pythonhosted.org/packages/bd/1f/b0bade1b1e905ae7e259f576490753ca349be1496cefccc8f69c6423547e/setuptools-3.2-py2.py3-none-any.whl#sha256=900a1d2cc619603ab456b4d1e3ee050ddd99515ebc81335de6431b469d6cbbda (from https://pypi.org/simple/setuptools/), version: 3.2
  Found link https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl#sha256=3236fe7288d155c238bb6c85d3e784db3a8e592e827b83fea4d36d8b749ecc4b (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3
  Found link https://files.pythonhosted.org/packages/c4/98/b0aba9599fc1b410c84b77e9ea5710b76a3e4174c1849ac769670b77c0e1/setuptools-3.2.tar.gz#sha256=326dcc78c7dded31b40261c064b89521155bec760492afec0279ad0cceb97bc5 (from https://pypi.org/simple/setuptools/), version: 3.2
  Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3
  ...
  Found link https://files.pythonhosted.org/packages/37/80/f13112921d93c656edaafeb344ff2969515e349351485274bca7d129d8ef/setuptools-50.3.1-py3-none-any.whl#sha256=8d057d7a928a82cdc985654355fc9e5431def7b6bdfc9e0f32d1e388a63c8ec6 (from https://pypi.org/simple/setuptools/) (requires-python:>=3.5), version: 50.3.1
  Found link https://files.pythonhosted.org/packages/ed/a9/891c9d088b353df30e315b66ba2b0594785f96433e3205b3eecace89a528/setuptools-50.3.1.zip#sha256=0e9772768fa6e9d3cf818a3e6e24dd2236f319d2c478312995edcb30ddeb8343 (from https://pypi.org/simple/setuptools/) (requires-python:>=3.5), version: 50.3.1
  Found link https://files.pythonhosted.org/packages/6d/38/c21ef5034684ffc0412deefbb07d66678332290c14bb5269c85145fbd55e/setuptools-50.3.2-py3-none-any.whl#sha256=2c242a0856fbad7efbe560df4a7add9324f340cf48df43651e9604924466794a (from https://pypi.org/simple/setuptools/) (requires-python:>=3.5), version: 50.3.2
  Found link https://files.pythonhosted.org/packages/a7/e0/30642b9c2df516506d40b563b0cbd080c49c6b3f11a70b4c7a670f13a78b/setuptools-50.3.2.zip#sha256=ed0519d27a243843b05d82a5e9d01b0b083d9934eaa3d02779a23da18077bd3c (from https://pypi.org/simple/setuptools/) (requires-python:>=3.5), version: 50.3.2
Package Version Latest Type  Location                                Installer
------- ------- ------ ----- --------------------------------------- ---------
pip     20.2.4  20.3   wheel c:\misc\pipbug\pipbug\lib\site-packages pip
WARNING: You are using pip version 20.2.4; however, version 20.3 is available.
You should consider upgrading via the 'c:\misc\pipbug\pipbug\scripts\python.exe -m pip install --upgrade pip' command.

(pipbug) C:\MISC\pipbug>python -m pip install -v -U pip
Using pip 20.2.4 from C:\MISC\pipbug\pipbug\lib\site-packages\pip (python 3.9)
Non-user install because user site-packages disabled
Created temporary directory: C:\Users\<user>\AppData\Local\Temp\pip-ephem-wheel-cache-lyndid24
Created temporary directory: C:\Users\<user>\AppData\Local\Temp\pip-req-tracker-m4sqqlee
Initialized build tracking at C:\Users\<user>\AppData\Local\Temp\pip-req-tracker-m4sqqlee
Created build tracker: C:\Users\<user>\AppData\Local\Temp\pip-req-tracker-m4sqqlee
Entered build tracker: C:\Users\<user>\AppData\Local\Temp\pip-req-tracker-m4sqqlee
Created temporary directory: C:\Users\<user>\AppData\Local\Temp\pip-install-bkx42cyi
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
  Found link https://files.pythonhosted.org/packages/3d/9d/1e313763bdfb6a48977b65829c6ce2a43eaae29ea2f907c8bbef024a7219/pip-0.2.tar.gz#sha256=88bb8d029e1bf4acd0e04d300104b7440086f94cc1ce1c5c3c31e3293aee1f81 (from https://pypi.org/simple/pip/), version: 0.2
  [approximately 275 lines deleted]
  Found link https://files.pythonhosted.org/packages/4e/5f/528232275f6509b1fff703c9280e58951a81abe24640905de621c9f81839/pip-20.2.3-py2.py3-none-any.whl#sha256=0f35d63b7245205f4060efe1982f5ea2196aa6e5b26c07669adcf800e2542026 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.3
  Found link https://files.pythonhosted.org/packages/59/64/4718738ffbc22d98b5223dbd6c5bb87c476d83a4c71719402935170064c7/pip-20.2.3.tar.gz#sha256=30c70b6179711a7c4cf76da89e8a0f5282279dfb0278bec7b94134be92543b6d (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.3
  Found link https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d396a433/pip-20.2.4-py2.py3-none-any.whl#sha256=51f1c7514530bd5c145d8f13ed936ad6b8bfcb8cf74e10403d0890bc986f0033 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.4
  Found link https://files.pythonhosted.org/packages/0b/f5/be8e741434a4bf4ce5dbc235aa28ed0666178ea8986ddc10d035023744e6/pip-20.2.4.tar.gz#sha256=85c99a857ea0fb0aedf23833d9be5c40cf253fe24443f0829c7b472e23c364a1 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.2.4
  Found link https://files.pythonhosted.org/packages/fb/46/26d13ba147ba430f9cda0d0cf599a041d142a5c8b1a90ff845ebce7fba0f/pip-20.3b1-py2.py3-none-any.whl#sha256=122fcd82deac1153c1699f29815bfab3f876e5bbe018cc2df1297f9802572a97 (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3b1
  Found link https://files.pythonhosted.org/packages/7f/61/2da3c027ad7bd4bc87a3ee7e7160c93e7500dac3536e02ff93008e9b3460/pip-20.3b1.tar.gz#sha256=819c710a5c8d8c5e44695d03e51cb23b08c070e1ae6a5d6910a89e248e0ff29c (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3b1
  Found link https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl#sha256=3236fe7288d155c238bb6c85d3e784db3a8e592e827b83fea4d36d8b749ecc4b (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3
  Found link https://files.pythonhosted.org/packages/03/41/6da553f689d530bc2c337d2c496a40dc9c0fdc6481e5df1f3ee3b8574479/pip-20.3.tar.gz#sha256=9ae7ca6656eac22d2a9b49d024fc24e00f68f4c4d4db673d2d9b525c3dea6e0e (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.3
Given no hashes to check 153 links for project 'pip': discarding no candidates
Using version 20.3 (newest of versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.3.1,1.4, 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.1.0, 8.1.1, 8.1.2, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 10.0.0, 10.0.1, 18.0, 18.1, 19.0, 19.0.1, 19.0.2, 19.0.3, 19.1, 19.1.1, 19.2, 19.2.1, 19.2.2, 19.2.3, 19.3, 19.3.1, 20.0, 20.0.1, 20.0.2, 20.1, 20.1.1, 20.2, 20.2.1, 20.2.2, 20.2.3, 20.2.4, 20.3)
Given no hashes to check 153 links for project 'pip': discarding no candidates
Using version 20.3 (newest of versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.2, 1.2.1, 1.3, 1.3.1,1.4, 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.1.0, 6.1.1, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.1.0, 8.1.1, 8.1.2, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 10.0.0, 10.0.1, 18.0, 18.1, 19.0, 19.0.1, 19.0.2, 19.0.3, 19.1, 19.1.1, 19.2, 19.2.1, 19.2.2, 19.2.3, 19.3, 19.3.1, 20.0, 20.0.1, 20.0.2, 20.1, 20.1.1, 20.2, 20.2.1, 20.2.2, 20.2.3, 20.2.4, 20.3)
Collecting pip
  Created temporary directory: C:\Users\<user>\AppData\Local\Temp\pip-unpack-kza6vp1o
  Looking up "https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl" in the cache
  Current age based on date: 29944
  Ignoring unknown cache-control directive: immutable
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 29944
  Using cached pip-20.3-py2.py3-none-any.whl (1.5 MB)
  Added pip from https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl#sha256=3236fe7288d155c238bb6c85d3e784db3a8e592e827b83fea4d36d8b749ecc4b to build tracker 'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-req-tracker-m4sqqlee'
  Removed pip from https://files.pythonhosted.org/packages/55/73/bce122d1ed0217b3c1a3439ab16dfa94bbeabd0d31755fcf907493abf39b/pip-20.3-py2.py3-none-any.whl#sha256=3236fe7288d155c238bb6c85d3e784db3a8e592e827b83fea4d36d8b749ecc4b from build tracker 'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-req-tracker-m4sqqlee'
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Created temporary directory: C:\MISC\pipbug\pipbug\Lib\site-packages\~ip-20.2.4.dist-info
      Removing file or directory c:\misc\pipbug\pipbug\lib\site-packages\pip-20.2.4.dist-info\
      Created temporary directory: C:\MISC\pipbug\pipbug\Lib\site-packages\~ip
      Removing file or directory c:\misc\pipbug\pipbug\lib\site-packages\pip\
      Created temporary directory: C:\Users\<user>\AppData\Local\Temp\pip-uninstall-b1845kuf
      Removing file or directory c:\misc\pipbug\pipbug\scripts\pip.exe
      Removing file or directory c:\misc\pipbug\pipbug\scripts\pip3.9.exe
      Removing file or directory c:\misc\pipbug\pipbug\scripts\pip3.exe
      Successfully uninstalled pip-20.2.4

Successfully installed pip-20.3
Removed build tracker: 'C:\\Users\\<user>\\AppData\\Local\\Temp\\pip-req-tracker-m4sqqlee'

(pipbug) C:\MISC\pipbug>pip list -o -v
1 location(s) to search for versions of setuptools:
* https://pypi.org/simple/setuptools/
1 location(s) to search for versions of wheel:
* https://pypi.org/simple/wheel/
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/setuptools/
Fetching project page and analyzing links: https://pypi.org/simple/wheel/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/setuptools/
Getting page https://pypi.org/simple/wheel/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Found index url https://pypi.org/simple
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/wheel/" in the cache
Looking up "https://pypi.org/simple/setuptools/" in the cache
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Request header has "max_age" as 0, cache bypassed
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
Starting new HTTPS connection (2): pypi.org:443
Starting new HTTPS connection (3): pypi.org:443
Incremented Retry for (url='/simple/setuptools/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
Starting new HTTPS connection (4): pypi.org:443
Incremented Retry for (url='/simple/pip/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (5): pypi.org:443
Incremented Retry for (url='/simple/setuptools/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
Incremented Retry for (url='/simple/pip/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
Incremented Retry for (url='/simple/wheel/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
Starting new HTTPS connection (6): pypi.org:443
Incremented Retry for (url='/simple/wheel/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
Starting new HTTPS connection (7): pypi.org:443
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (8): pypi.org:443
Incremented Retry for (url='/simple/setuptools/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
Incremented Retry for (url='/simple/pip/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
Starting new HTTPS connection (9): pypi.org:443
Incremented Retry for (url='/simple/wheel/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
Starting new HTTPS connection (10): pypi.org:443
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (11): pypi.org:443
Incremented Retry for (url='/simple/setuptools/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
Incremented Retry for (url='/simple/pip/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
Starting new HTTPS connection (12): pypi.org:443
Incremented Retry for (url='/simple/wheel/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
Starting new HTTPS connection (13): pypi.org:443
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (14): pypi.org:443
Incremented Retry for (url='/simple/setuptools/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
Incremented Retry for (url='/simple/pip/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
Starting new HTTPS connection (15): pypi.org:443
Incremented Retry for (url='/simple/wheel/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/setuptools/
Starting new HTTPS connection (16): pypi.org:443
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (17): pypi.org:443
Could not fetch URL https://pypi.org/simple/setuptools/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))) - skipping
Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))) - skipping
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/wheel/
Starting new HTTPS connection (18): pypi.org:443
Could not fetch URL https://pypi.org/simple/wheel/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/wheel/ (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))) - skipping

(pipbug) C:\MISC\pipbug>python -m pip install -v -U "pip<20.3"
Using pip 20.3 from C:\MISC\pipbug\pipbug\lib\site-packages\pip (python 3.9)
Non-user install because user site-packages disabled
Created temporary directory: C:\Users\jap16664\AppData\Local\Temp\pip-ephem-wheel-cache-kx140v46
Created temporary directory: C:\Users\jap16664\AppData\Local\Temp\pip-req-tracker-_qzqnpln
Initialized build tracking at C:\Users\jap16664\AppData\Local\Temp\pip-req-tracker-_qzqnpln
Created build tracker: C:\Users\jap16664\AppData\Local\Temp\pip-req-tracker-_qzqnpln
Entered build tracker: C:\Users\jap16664\AppData\Local\Temp\pip-req-tracker-_qzqnpln
Created temporary directory: C:\Users\jap16664\AppData\Local\Temp\pip-install-mzbwctla
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
Incremented Retry for (url='/simple/pip/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (2): pypi.org:443
Incremented Retry for (url='/simple/pip/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (3): pypi.org:443
Incremented Retry for (url='/simple/pip/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (4): pypi.org:443
Incremented Retry for (url='/simple/pip/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (5): pypi.org:443
Incremented Retry for (url='/simple/pip/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pip/
Starting new HTTPS connection (6): pypi.org:443
Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))) - skipping
Given no hashes to check 0 links for project 'pip': discarding no candidates
ERROR: Could not find a version that satisfies the requirement pip<20.3
ERROR: No matching distribution found for pip<20.3
Exception information:
Traceback (most recent call last):
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'pip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 310, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 83, in from_requirement
    raise RequirementsConflicted(criterion)
pip._vendor.resolvelib.resolvers.RequirementsConflicted: Requirements conflict: SpecifierRequirement('pip<20.3')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 445, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 312, in resolve
    raise ResolutionImpossible(e.criterion.information)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('pip<20.3'), parent=None)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_internal\cli\base_command.py", line 210, in _main
    status = self.run(options, args)
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
    requirement_set = resolver.resolve(
  File "C:\MISC\pipbug\pipbug\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 127, in resolve
    six.raise_from(error, e)
  File "<string>", line 3, in raise_from
pip._internal.exceptions.DistributionNotFound: No matching distribution found for pip<20.3
Removed build tracker: 'C:\\Users\\jap16664\\AppData\\Local\\Temp\\pip-req-tracker-_qzqnpln'

(pipbug) C:\MISC\pipbug>

@no-response no-response bot removed the S: awaiting response Waiting for a response/more information label Dec 1, 2020
@Olivier-OH
Copy link

Many colleagues had the issue, but I did not on my own workstation, and we still don't understand why.

I had a hunch it had something to do with window's SSL library as I have a Windows 1903 and the colleagues have 1803. But it may not be related after all?

@bdemircan
Copy link

Having exactly this problem since 20.3 upgrade. I analyze log and pip never tries to reach the defined proxy server port at all

@robertschulze
Copy link

robertschulze commented Dec 2, 2020

I can confirm the issue, proxy environment variable http_proxy is ignored in 20.3, downgrading to 20.2.4 returns the pip into a working state.

(base) C:\Portable\anaconda36\Scripts>c:\portable\anaconda36\python.exe -m pip install --upgrade pip
Collecting pip
  Using cached pip-20.3-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Successfully uninstalled pip-20.2.4
Successfully installed pip-20.3

(base) C:\Portable\anaconda36\Scripts>c:\portable\anaconda36\python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\portable\anaconda36\lib\site-packages (20.3)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple
/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple
/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple
/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple
/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)': /simple
/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by
SSLError(SSLError(1, '[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:833)'),)) - skipping

@uranusjr
Copy link
Member

uranusjr commented Dec 2, 2020

Since those configs come from requests (or urllib3?), this may be related to the vendor upgrade.

@uranusjr
Copy link
Member

uranusjr commented Dec 3, 2020

One way to verify this would be to run requests.get("https://pypi.org/simple/pip/") behind the proxy and see what happens.

pip 20.3 uses the following versions:

requests==2.25.0
certifi==2020.11.08
chardet==3.0.4
idna==2.10
urllib3==1.26.2

pip 20.2.4:

requests==2.24.0
certifi==2020.06.20
chardet==3.0.4
idna==2.10
urllib3==1.25.9

@uranusjr
Copy link
Member

uranusjr commented Dec 4, 2020

It seems like this is indeed a urllib3 change (urllib3/urllib3#2075). Maybe we should downgrade urllib3 to <1.26 for now while they figure out the best resolution for this.

@uranusjr uranusjr added the project: vendored dependency Related to a vendored dependency label Dec 4, 2020
@uranusjr
Copy link
Member

uranusjr commented Dec 4, 2020

People affected by this issue: Can you provide the URL you’re using as your proxy for us to validate whether this is indeed causing the issue?

@jmpernito
Copy link

jmpernito commented Dec 5, 2020

I encountered this issue in our setup and rolling back to use 20.3b1 works fine.

Below is the issue with 20.3:

[root@e116-tcs Downloads]# pip install --upgrade sphinx
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in Janu
ary 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functi
onality.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:6
18)'),)': /simple/sphinx/                                                                                                                                                                    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:618)'),)': /simple/sphinx/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:618)'),)': /simple/sphinx/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:618)'),)': /simple/sphinx/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:6
18)'),)': /simple/sphinx/
Could not fetch URL https://pypi.org/simple/sphinx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simp
le/sphinx/ (Caused by SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:618)'),)) - skipping

Our proxy is https://web-proxy.ourdomain.net:8080.

@GreggMidon
Copy link

I got the above error with —proxy set to our “https” proxy URL. Changed it to “http” and it works fine.

@tomerv
Copy link

tomerv commented Dec 6, 2020

The new flow for tls_in_tls_required is at fault - introduced in e76b1dd

Removing these 2 lines makes everything work again:

        if self.proxy.scheme == "https":
            conn.tls_in_tls_required = True

I have no idea what's the purpose of this, and I couldn't find any explanation in the code or the commit message.
This also explains @GreggMidon 's comment above:

I got the above error with —proxy set to our “https” proxy URL. Changed it to “http” and it works fine.

EDIT: I now think that the code is fine, even if a bit unclear. Changing the proxy from "https" to "http" is the correct solution.

@FDUZS
Copy link

FDUZS commented Dec 9, 2020

same here. pip version 20.3.1

Zheng ~\..\pywonderland git: master ≣ ❯❯❯ pip install -r .\requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/colour/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/colour/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/colour/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/colour/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/colour/
ERROR: Could not find a version that satisfies the requirement colour
ERROR: No matching distribution found for colour

@uranusjr
Copy link
Member

uranusjr commented Dec 9, 2020

Hi, we have identified this is caused by a change in the underlying urllib3 implementation. urllib3 maintainers have commented on #8785, which is the caused by the same change, so I will make that issue the canonical thread for this.

@uranusjr uranusjr closed this as completed Dec 9, 2020
@uranusjr uranusjr added resolution: duplicate Duplicate of an existing issue/PR and removed state: needs reproducer Need to reproduce issue labels Dec 9, 2020
@tomerv
Copy link

tomerv commented Dec 9, 2020

Hi, we have identified this is caused by a change in the underlying urllib3 implementation. urllib3 maintainers have commented on #8785, which is the caused by the same change, so I will make that issue the canonical thread for this.

@uranusjr , I think you mean #9216 .

@uranusjr
Copy link
Member

uranusjr commented Dec 9, 2020

Oops, thanks for the correction!

@japagetw
Copy link
Author

The fix suggested by @tomerv solved my problem. The two lines are in question are lines 961 and 962 of connectionpool.py. You should apply this fix to all instances of connectionpool.py that contain these two lines. One instance will be in the pip package and another instance will be in urllib3 package if you have it installed.

@junqfisica
Copy link
Contributor

The bug still persists at version 21.0.1 when using pip behind a proxy. It's quite annoying to downgrade to pip 20.2.3 every time I need to create a new venv. The solution given by @tomerv works!! I also add

conn.tls_in_tls_required = False

just after line 962 at ... \venv\Lib\site-packages\pip\_vendor\urllib3\connectionpool.py

This issue really should be addressed for the next version of pip.

@uranusjr
Copy link
Member

uranusjr commented Mar 1, 2021

Sorry for the tone, but you started this first. Maybe you should contribute something for the next version of pip, if you know what needs changing and how?

@tomerv
Copy link

tomerv commented Mar 1, 2021

I actually don't think any longer that there's a bug here. As I commented in the referenced issue (#9216 (comment)) the error is on the user's side, using "https://" when "http://" should be used. Therefore, the fix I suggested before would be incorrect. I do think that pip should provide a better error message in this case, if possible. Sadly, I don't have the expertise to do that.

@junqfisica
Copy link
Contributor

Thank you @tomerv for the reply. I understand your point, and I agree that changing from "https://" to "http://" should be the best option, therefore it seems not to be a working one. I have run the following command:

pip install --proxy http://proxy_ip:80 numpy

and that's the error:

Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)'))) - skipping

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated and has no effect anymore. pip 21.1 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)'))': /simple/numpy/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)'))': /simple/numpy/

The problem is caused because self.proxy.scheme is equal to "https" with then sets conn.tls_in_tls_required = True. So, it seems that the --proxy parameter being passed to pip has no effect in set the right sheme.

The error is clear. The problem is the SSL certificate since it understands I'm using HTTPS. It seems that the parameter --proxy passed to pip has no effect to set the proxy.

@junqfisica
Copy link
Contributor

Okay, I would like to make some clarifications.

The problem seems to be related to how pip is getting the proxy. Passing a proxy parameter to pip installation has no effect, instead, pip gets it from the system (Windows in my case).

Doing SET HTTPS_PROXY=http:my_proxy then pip install package solves the problem. However, I'm using Pycharm which means that the installer from it doesn't work and I need to run the command in the terminal myself.

To deploy the application to the server (Centos) also doesn't work. I use Ansible for that and I pass the proxy to it. But somehow pip fails to get the proxy from the --proxy parameter. So, I would say the error lies there. As a user, I would expect pip to use whatever address I pass to the proxy parameter, and not get the proxy from the system var.

@junqfisica
Copy link
Contributor

@tomerv I have found the problem. It's actually within pip at pi\_internal\network\session.py in the method PipSession().request() line 419

I'm using pip 21.0.1 to debug.

The problem is caused because the proxy set by --proxy in the pip method is not being passed corrected to the request of urllib package.

This is the original request method of PipSession:

def request(self, method, url, *args, **kwargs):
        # Allow setting a default timeout on a session
        kwargs.setdefault("timeout", self.timeout)
        
        # Dispatch the actual request
        return super().request(method, url, *args, **kwargs)

If you make a breakpoint there you gonna see that self.proxies is corrected setted from --proxies, however, when the call to the parent class is made the proxies get lost and urllib set it from the system, which then gets the wrong scheme (https instead of http).

An easy fix I suggest is to add the following line at the request method in the file pi\_internal\network\session.py, line 419:

def request(self, method, url, *args, **kwargs):
     # Allow setting a default timeout on a session
     kwargs.setdefault("timeout", self.timeout)
     kwargs.setdefault("proxies", self.proxies)  # fix problem with proxies.

    # Dispatch the actual request
    return super().request(method, url, *args, **kwargs)

This way the proxies are carried out correctly to the request, if no proxy is set an empty dict is passed.

So now if you run pip install package --proxy http://proxy_ip everything works as expected.

I hope this will help to remove this bug in next versions of pip asap.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: network connectivity C: proxy Dealing with proxies and networking project: vendored dependency Related to a vendored dependency resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests