kennethreitz/requests — pull request #2094 by moliware (2014-06-11 19:46:51+00:00)
Title: Default timeout for requests.Session object

The idea is to have a default timeout for each request you make with a session object.

Example:

```python
>>> import requests
>>> s = requests.Session()
>>> s.timeout = 1
>>> s.get('https://httpbin.org/delay/10')
Traceback (most recent call last):
File "", line 1, in
File "requests/sessions.py", line 473, in get
return self.request('GET', url, **kwargs)
File "requests/sessions.py", line 461, in request
resp = self.send(prep, **send_kwargs)
File "requests/sessions.py", line 564, in send
r = adapter.send(request, **kwargs)
File "requests/adapters.py", line 384, in send
raise Timeout(e, request=request)
requests.exceptions.Timeout: HTTPSConnectionPool(host='httpbin.org', port=443): Read timed out.
```

I came up with this PR to meet a need of a project based on requests => https://github.com/RedTuna/mysolr/issues/40

Thanks!