Python 3.7.6: urllib3.exceptions.ProxySchemeUnknown

Proxy setup without scheme is not working on Python 3.7.6

While it works on Python 3.7.5:

```python
Python 3.7.5 (default, Nov 23 2019, 05:59:34) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get("http://httpbin.org/get", proxies={"http": "103.250.166.4:6666"})
<Response [200]>
```
Is not under Python 3.7.6

```python
Python 3.7.6 (default, Dec 21 2019, 08:28:11) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.get("http://httpbin.org/get", proxies={"http": "103.250.166.4:6666"})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 199, in proxy_manager_for
    **proxy_kwargs)
  File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 470, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 420, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
```
It seems that some changes on Python `urllib.parse.urlparse` brake `requests.utils.prepend_scheme_if_needed`
```python
>>> utils.prepend_scheme_if_needed('103.250.166.4:6666', 'http')
'103.250.166.4://6666'
```
So it looks like this utils has to update to match Python changes (I think the change that produces this is https://github.com/python/cpython/commit/5a88d50ff013a64fbdb25b877c87644a9034c969). In both cases I'm using requests 2.22.0.

Reporting here since `urllib.parse.urlparse` behaviour is wrong in both Python versions and I think the problem is `requests.utils.prepend_scheme_if_needed` problem:

Python 3.7.5
```python
>>> from urllib import parse
>>> parse.urlparse("103.250.166.4:6666")
ParseResult(scheme='', netloc='', path='103.250.166.4:6666', params='', query='', fragment='')
```
Python 3.7.6
```python
>>> from urllib import parse
>>> parse.urlparse("103.250.166.4:6666")
ParseResult(scheme='103.250.166.4', netloc='', path='6666', params='', query='', fragment='')
```

Thanks for reporting this issue and doing investigation!

You can fix this by using `http://<ip>:<port>` instead of just an IP.

you can solve the problem??
i have the same issue with python 3.8

> Proxy setup without scheme is not working on Python 3.7.6
> 
> While it works on Python 3.7.5:
> 
> ```python
> Python 3.7.5 (default, Nov 23 2019, 05:59:34) 
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import requests
> >>> requests.get("http://httpbin.org/get", proxies={"http": "103.250.166.4:6666"})
> <Response [200]>
> ```
> 
> Is not under Python 3.7.6
> 
> ```python
> Python 3.7.6 (default, Dec 21 2019, 08:28:11) 
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import requests
> >>> requests.get("http://httpbin.org/get", proxies={"http": "103.250.166.4:6666"})
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
>     return request('get', url, params=params, **kwargs)
>   File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
>     return session.request(method=method, url=url, **kwargs)
>   File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
>     resp = self.send(prep, **send_kwargs)
>   File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
>     r = adapter.send(request, **kwargs)
>   File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 412, in send
>     conn = self.get_connection(request.url, proxies)
>   File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 309, in get_connection
>     proxy_manager = self.proxy_manager_for(proxy)
>   File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 199, in proxy_manager_for
>     **proxy_kwargs)
>   File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 470, in proxy_from_url
>     return ProxyManager(proxy_url=url, **kw)
>   File "/usr/local/lib/python3.7/site-packages/urllib3/poolmanager.py", line 420, in __init__
>     raise ProxySchemeUnknown(proxy.scheme)
> urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None
> ```
> 
> It seems that some changes on Python `urllib.parse.urlparse` brake `requests.utils.prepend_scheme_if_needed`
> 
> ```python
> >>> utils.prepend_scheme_if_needed('103.250.166.4:6666', 'http')
> '103.250.166.4://6666'
> ```
> 
> So it looks like this utils has to update to match Python changes (I think the change that produces this is [python/cpython@5a88d50](https://github.com/python/cpython/commit/5a88d50ff013a64fbdb25b877c87644a9034c969)). In both cases I'm using requests 2.22.0.
> 
> Reporting here since `urllib.parse.urlparse` behaviour is wrong in both Python versions and I think the problem is `requests.utils.prepend_scheme_if_needed` problem:
> 
> Python 3.7.5
> 
> ```python
> >>> from urllib import parse
> >>> parse.urlparse("103.250.166.4:6666")
> ParseResult(scheme='', netloc='', path='103.250.166.4:6666', params='', query='', fragment='')
> ```
> 
> Python 3.7.6
> 
> ```python
> >>> from urllib import parse
> >>> parse.urlparse("103.250.166.4:6666")
> ParseResult(scheme='103.250.166.4', netloc='', path='6666', params='', query='', fragment='')
> ```

you can solve the problem??
i have same issue with python 3.8

@Crackde:

> You can fix this by using `http://<ip>:<port>` instead of just an IP.

yes, this fixes the issue for 3.7.6 or 3.8.x
either by `--proxy http://<ip>:<port>`
or in (Windows') %APPDATA%\pip\pip.ini, `[global]` section:
`http://<ip>:<port>`


I observed the same error. As already mentioned above, i also can solve the problem by adding a leading `http://` to the `--proxy` command line argument or in `%APPDATA%\pip\pip.ini` configuration file.

```
System information:
OS: Windows 10 Enterprise (Build 17134)
Python: 3.8.1 (x86)
pip: 19.3.1
```

It looks like Seth has answered this and it's working as expected now. Going to resolve, thanks everyone.

The fix is not applicable if one is using another library and has no direct control over the proxy urls.

I think  the solution should be to fix the way `utils.prepend_scheme_if_needed `method calls the urllib3 helpers. as it currently is not working as intended (it should at least not produce invalid urls): 
> utils.prepend_scheme_if_needed('103.250.166.4:6666', 'http')
> '103.250.166.4://6666'

The issues seems that urlsplit searches for the first ":" and assumes everything to the right to be the scheme - unless it contains an illegal character(a non-alphanumeric  character except +-.).
 This also overrides the default scheme that the prepend_scheme_if_needed passes to urlparse, which passes it to urlsplit.

`103.250.166.4:6666 `--> scheme = 103.250.166.4, path=6666

prefixing it with "//" - as is expected by urlparse -  works:

`//103.250.166.4:6666` --> scheme = None (default is used) , netloc=103.250.166.4:6666

Maybe prepend_scheme can first check for the presence of a scheme and then call urlparse with the prepended "//"?
 Or is this an issue with urllib?


When I try to update by conda, I had received this following report



Traceback (most recent call last):
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
    return getattr(module, func_name)(args, parser)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\main_update.py", line 20, in execute
    install(args, parser, 'update')
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\install.py", line 265, in install
    should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
    ssc = self._collect_all_metadata(ssc)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
    return f(*args, **kwds)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 415, in _collect_all_metadata
    index, r = self._prepare(prepared_specs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 1011, in _prepare
    self.subdirs, prepared_specs, self._repodata_fn)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\index.py", line 228, in get_reduced_index
    repodata_fn=repodata_fn)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 105, in query_all
    result = tuple(concat(executor.map(subdir_query, channel_urls)))
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 435, in result
    return self.__get_result()
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 98, in <lambda>
    package_ref_or_match_spec))
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 110, in query
    self.load()
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 174, in load
    _internal_state = self._load()
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 248, in _load
    repodata_fn=self.repodata_fn)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 485, in fetch_repodata_remote_request
    timeout=timeout)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 199, in proxy_manager_for
    **proxy_kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\urllib3\poolmanager.py", line 470, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\urllib3\poolmanager.py", line 420, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None

Last one mean it is similar problem.
However, I could not understand how to change setting proxy.

I try to change it, however, the manner may be bad

(base) C:\Users\Shungo>conda update conda
Collecting package metadata (current_repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 412, in send
        conn = self.get_connection(request.url, proxies)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 305, in get_connection
        proxy_url = parse_url(proxy)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\urllib3\util\url.py", line 392, in parse_url
        return six.raise_from(LocationParseError(source_url), None)
      File "<string>", line 3, in raise_from
    urllib3.exceptions.LocationParseError: Failed to parse: https://<ip>:<port>

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
        exit_code = do_call(args, p)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
        return getattr(module, func_name)(args, parser)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\main_update.py", line 20, in execute
        install(args, parser, 'update')
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\install.py", line 265, in install
        should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
        should_retry_solve)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
        force_remove, should_retry_solve)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
        return f(*args, **kwds)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 415, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 1011, in _prepare
        self.subdirs, prepared_specs, self._repodata_fn)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\index.py", line 228, in get_reduced_index
        repodata_fn=repodata_fn)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 105, in query_all
        result = tuple(concat(executor.map(subdir_query, channel_urls)))
      File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 598, in result_iterator
        yield fs.pop().result()
      File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 435, in result
        return self.__get_result()
      File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
        raise self._exception
      File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\thread.py", line 57, in run
        result = self.fn(*self.args, **self.kwargs)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 98, in <lambda>
        package_ref_or_match_spec))
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 110, in query
        self.load()
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 174, in load
        _internal_state = self._load()
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 248, in _load
        repodata_fn=self.repodata_fn)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 485, in fetch_repodata_remote_request
        timeout=timeout)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 546, in get
        return self.request('GET', url, **kwargs)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
        resp = self.send(prep, **send_kwargs)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
        r = adapter.send(request, **kwargs)
      File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 414, in send
        raise InvalidURL(e, request=request)
    requests.exceptions.InvalidURL: Failed to parse: https://<ip>:<port>

I sove this by modify pip\_vendor\requests\adapters.py
    def get_connection(self, url, proxies=None):
        """Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool
        """
        proxy = select_proxy(url, proxies)
        print(proxy)

        proxy = None #<<<<<< ADD THIS LINE
        if proxy:
            proxy = prepend_scheme_if_needed(proxy, 'http')
            proxy_url = parse_url(proxy)
            if not proxy_url.host:
                raise InvalidProxyURL("Please check proxy URL. It is malformed"
                                      " and could be missing the host.")
            proxy_manager = self.proxy_manager_for(proxy)
            conn = proxy_manager.connection_from_url(url)
        else:
            # Only scheme should be lower case
            parsed = urlparse(url)
            url = parsed.geturl()
            conn = self.poolmanager.connection_from_url(url)

        return conn


@sethmlarson 
> You can fix this by using `http://<ip>:<port>` instead of just an IP.

Sorry I still don't get what I should alter here:
```python
proxy={'http': '91.98.102.84:1080', 'https': '91.98.102.84:1080'}
import requests
url='https://httpbin.org/ip'
r=requests.get(url,proxies=proxy,timeout=7)
```

    ProxySchemeUnknown: Not supported proxy scheme None



`proxy={'http': 'http://91.98.102.84:1080', 'https': 'http://91.98.102.84:1080'}`

> `proxy={'http': 'http://91.98.102.84:1080', 'https': 'http://91.98.102.84:1080'}`

This solution doesn't work with python 3.9.1 version, by running the below code, I get Errors:

```
import requests
proxies = {'https': 'http://207.144.111.230:8080', 'http':'http://207.144.111.230:8080'}
url = 'https://httpbin.org/ip'
r = requests.get(url, proxies=proxies)
```
By running the code I get:
```
Traceback (most recent call last):
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\connection.py", line 96, in create_connection
    raise err
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\connection.py", line 86, in create_connection
    sock.connect(sa)
TimeoutError: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 353, in connect
    conn = self._new_conn()
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 181, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000026AD7D9F490>: Failed to establish a new connection: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError("<urllib3.connection.HTTPSConnection object at 0x0000026AD7D9F490>: Failed to establish a new connection: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\texas\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 510, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError("<urllib3.connection.HTTPSConnection object at 0x0000026AD7D9F490>: Failed to establish a new connection: [WinError 10060] Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato")))

```
Translation of the error's last line:
Unable to establish connection. Incorrect response from the connected party after the time interval or no response from the connected host 
The requests lib version is 2.25.1

Try like this it will be working , 


import requests
url = "http://httpbin.org/ip"
proxy_host = "proxy.crawlera.com"
proxy_port = "8010"
proxy_auth = ":"
proxies = {
       "https": "https://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port),
       "http": "http://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port)
}
r = requests.get(url, proxies=proxies, verify=False)

I had to re-edit my answer.

urllib3 and requests proxy implementations are distinctly different.

From [requests](https://docs.python-requests.org/en/master/index.html#requests-http-for-humans):
Based on the requests Proxies section; https://docs.python-requests.org/en/master/user/advanced/#proxies

Notice there is no "s" in  https property value. 
``` python

import requests

proxies = {
  'http': 'http://10.10.1.10:3128',
  'https': 'http://10.10.1.10:1080',
               ^
}

requests.get('http://example.org', proxies=proxies)
```

From [urllib3](https://urllib3.readthedocs.io/en/stable/index.html#urllib3):
Based on the the urllib3 Proxies section; https://urllib3.readthedocs.io/en/stable/advanced-usage.html?highlight=proxy#proxies

```python
>>> import urllib3
>>> proxy = urllib3.ProxyManager('http://localhost:3128/')
>>> proxy.request('GET', 'http://google.com/')
```







> Make sure you have a trailing forward slash at the very end of the url string.
> 
> ```python
> "https://190.7.141.66:8080/"
>                           ^
> ```
> 
> I spend hours trying to understand why it wasn't working.
> 
> I hope it helps the next dev.

not working for me :(


@Zeyrox-Zy I just updated my answer.

proxy = {'http':'http://127.0.0.1:8000/', 'https':'http://127.0.0.1:8000/'}
url ='http://httpbin.org/ip'
r = requests.get(url, proxies=proxy)

this is not working as well.