mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge branch 'develop' into feature/rewrite
Conflicts: requests/__init__.py
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
History
|
||||
-------
|
||||
|
||||
0.7.4 (2011-10-26)
|
||||
++++++++++++++++++
|
||||
|
||||
* Sesion Hooks fix.
|
||||
|
||||
0.7.3 (2011-10-23)
|
||||
++++++++++++++++++
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ defaults = dict()
|
||||
defaults['base_headers'] = {
|
||||
'User-Agent': 'python-requests/%s' % __version__,
|
||||
'Accept-Encoding': ', '.join(('identity', 'deflate', 'compress', 'gzip')),
|
||||
'Accept': '*/*'
|
||||
}
|
||||
|
||||
defaults['proxies'] = {}
|
||||
@@ -36,4 +37,4 @@ defaults['decode_unicode'] = True
|
||||
defaults['timeout_fallback'] = True
|
||||
# defaults['keep_alive'] = True
|
||||
defaults['pool_connections'] = 10
|
||||
defaults['pool_maxsize'] = 1
|
||||
defaults['pool_maxsize'] = 1
|
||||
|
||||
@@ -168,8 +168,9 @@ class Session(object):
|
||||
|
||||
args[attr] = merge_kwargs(local_val, session_val)
|
||||
|
||||
|
||||
# Arguments manipulation hook.
|
||||
args = dispatch_hook('args', hooks, args)
|
||||
args = dispatch_hook('args', args['hooks'], args)
|
||||
|
||||
r = Request(**args)
|
||||
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@ import unittest
|
||||
|
||||
import requests
|
||||
import envoy
|
||||
from urllib2 import HTTPError
|
||||
|
||||
try:
|
||||
import omnijson as json
|
||||
@@ -240,7 +241,7 @@ class RequestsTestSuite(unittest.TestCase):
|
||||
|
||||
def test_status_raising(self):
|
||||
r = requests.get(httpbin('status', '404'))
|
||||
self.assertRaises(requests.HTTPError, r.raise_for_status)
|
||||
self.assertRaises(HTTPError, r.raise_for_status)
|
||||
|
||||
r = requests.get(httpbin('status', '200'))
|
||||
self.assertFalse(r.error)
|
||||
|
||||
Reference in New Issue
Block a user