<p dir="auto">I think that exception should be handled/wrapped internally and be reraised as a <code class="notranslate">RequestException</code>-based exception.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;X:\dev\rotaryboard\daemon\testdaemon.py&quot;, line 117, in &lt;module&gt;
    res = foobar_cmd()
  File &quot;X:\dev\rotaryboard\daemon\testdaemon.py&quot;, line 53, in foobar_cmd
    return requests.get(url, params=params, auth=('foobar', 'meow'), timeout=0.1).json()
  File &quot;F:\Python27\lib\site-packages\requests\api.py&quot;, line 55, in get
    return request('get', url, **kwargs)
  File &quot;F:\Python27\lib\site-packages\requests\api.py&quot;, line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File &quot;F:\Python27\lib\site-packages\requests\sessions.py&quot;, line 382, in request
    resp = self.send(prep, **send_kwargs)
  File &quot;F:\Python27\lib\site-packages\requests\sessions.py&quot;, line 485, in send
    r = adapter.send(request, **kwargs)
  File &quot;F:\Python27\lib\site-packages\requests\adapters.py&quot;, line 388, in send
    r.content
  File &quot;F:\Python27\lib\site-packages\requests\models.py&quot;, line 676, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File &quot;F:\Python27\lib\site-packages\requests\models.py&quot;, line 615, in generate
    decode_content=True):
  File &quot;F:\Python27\lib\site-packages\requests\packages\urllib3\response.py&quot;, line 236, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File &quot;F:\Python27\lib\site-packages\requests\packages\urllib3\response.py&quot;, line 183, in read
    data = self._fp.read(amt)
  File &quot;F:\Python27\lib\httplib.py&quot;, line 552, in read
    s = self.fp.read(amt)
  File &quot;F:\Python27\lib\httplib.py&quot;, line 1288, in read
    return s + self._file.read(amt - len(s))
  File &quot;F:\Python27\lib\socket.py&quot;, line 378, in read
    data = self._sock.recv(left)
socket.timeout: timed out"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "X:\dev\rotaryboard\daemon\testdaemon.py", line 117, in &lt;module&gt;
    res = foobar_cmd()
  File "X:\dev\rotaryboard\daemon\testdaemon.py", line 53, in foobar_cmd
    return requests.get(url, params=params, auth=('foobar', 'meow'), timeout=0.1).json()
  File "F:\Python27\lib\site-packages\requests\api.py", line 55, in get
    return request('get', url, **kwargs)
  File "F:\Python27\lib\site-packages\requests\api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "F:\Python27\lib\site-packages\requests\sessions.py", line 382, in request
    resp = self.send(prep, **send_kwargs)
  File "F:\Python27\lib\site-packages\requests\sessions.py", line 485, in send
    r = adapter.send(request, **kwargs)
  File "F:\Python27\lib\site-packages\requests\adapters.py", line 388, in send
    r.content
  File "F:\Python27\lib\site-packages\requests\models.py", line 676, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "F:\Python27\lib\site-packages\requests\models.py", line 615, in generate
    decode_content=True):
  File "F:\Python27\lib\site-packages\requests\packages\urllib3\response.py", line 236, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "F:\Python27\lib\site-packages\requests\packages\urllib3\response.py", line 183, in read
    data = self._fp.read(amt)
  File "F:\Python27\lib\httplib.py", line 552, in read
    s = self.fp.read(amt)
  File "F:\Python27\lib\httplib.py", line 1288, in read
    return s + self._file.read(amt - len(s))
  File "F:\Python27\lib\socket.py", line 378, in read
    data = self._sock.recv(left)
socket.timeout: timed out
</code></pre></div>
<p dir="auto">When <em>timeout</em> parameter is used, socket operations can thrown <em>socket.timeout</em> exception, which is not converted into <em>requests.exceptions.Timeout</em>. This causes users to handle two different types of exceptions, which essentially represent the same error.</p>
<p dir="auto">Here is corresponding traceback:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; r=requests.get('http://files.animeblog.ru/manga/Bakuman/Bakuman_vol01.rar', timeout=0.5)
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/api.py&quot;, line 55, in get
    return request('get', url, **kwargs)
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/api.py&quot;, line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/sessions.py&quot;, line 279, in request
    resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/sessions.py&quot;, line 374, in send
    r = adapter.send(request, **kwargs)
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/adapters.py&quot;, line 222, in send
    r.content
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/models.py&quot;, line 550, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/models.py&quot;, line 496, in generate
    chunk = self.raw.read(chunk_size)
  File &quot;/Users/u/vpython/lib/python2.7/site-packages/requests/packages/urllib3/response.py&quot;, line 148, in read
    return self._fp.read(amt)
  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py&quot;, line 561, in read
    s = self.fp.read(amt)
  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py&quot;, line 380, in read
    data = self._sock.recv(left)
socket.timeout: timed out"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; r=requests.get('http://files.animeblog.ru/manga/Bakuman/Bakuman_vol01.rar', timeout=0.5)
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/sessions.py", line 279, in request
    resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/sessions.py", line 374, in send
    r = adapter.send(request, **kwargs)
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/adapters.py", line 222, in send
    r.content
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/models.py", line 550, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/models.py", line 496, in generate
    chunk = self.raw.read(chunk_size)
  File "/Users/u/vpython/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 148, in read
    return self._fp.read(amt)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 561, in read
    s = self.fp.read(amt)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 380, in read
    data = self._sock.recv(left)
socket.timeout: timed out
</code></pre></div>