Cannot catch ConnectionError with requests
<p>I'm doing this:</p>

<pre><code>import requests
r = requests.get("http://non-existent-domain.test")
</code></pre>

<p>And getting</p>

<pre><code>ConnectionError: HTTPConnectionPool(host='non-existent-domain.test', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('&lt;requests.packages.urllib3.connection.HTTPConnection object at 0x10b0170f0&gt;: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))
</code></pre>

<p>However, if I try to catch it like this:</p>

<pre><code>try:
    r = requests.get("http://non-existent-domain.test")
except ConnectionError:
    print("ConnectionError")
</code></pre>

<p>Nothing changes, I still have <code>ConnectionError</code> unhandled. How to catch it properly?</p>