From 8d43cd9c016a364867bde7fa1d351081f1820905 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Tue, 5 Feb 2013 09:45:46 -0600 Subject: [PATCH] Allow requests 0.8 and greater Bump up version requirements for requests to standardize on version >= 0.8 so it doesnt create conflict with other openstack projects. Change-Id: I1ed9b3bd6bdbbbb451298a3c397e6e7a06c0cabd Signed-off-by: Chuck Short --- cinderclient/client.py | 8 ++------ tests/utils.py | 1 - tools/pip-requires | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cinderclient/client.py b/cinderclient/client.py index c4dbdd931..d0f75d71d 100644 --- a/cinderclient/client.py +++ b/cinderclient/client.py @@ -37,10 +37,6 @@ class HTTPClient(object): USER_AGENT = 'python-cinderclient' - requests_config = { - 'danger_mode': False, - } - def __init__(self, user, password, projectid, auth_url, insecure=False, timeout=None, tenant_id=None, proxy_tenant_id=None, proxy_token=None, region_name=None, @@ -79,7 +75,8 @@ class HTTPClient(object): ch = logging.StreamHandler() self._logger.setLevel(logging.DEBUG) self._logger.addHandler(ch) - self.requests_config['verbose'] = sys.stderr + if hasattr(requests, logging): + requests.logging.getLogger(requests.__name__).addHandler(ch) def http_log_req(self, args, kwargs): if not self.http_log_debug: @@ -123,7 +120,6 @@ class HTTPClient(object): method, url, verify=self.verify_cert, - config=self.requests_config, **kwargs) self.http_log_resp(resp) diff --git a/tests/utils.py b/tests/utils.py index 9da5f1a27..3a1292372 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -7,7 +7,6 @@ import testtools class TestCase(testtools.TestCase): TEST_REQUEST_BASE = { - 'config': {'danger_mode': False}, 'verify': True, } diff --git a/tools/pip-requires b/tools/pip-requires index fab48304c..e7086300c 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -1,4 +1,4 @@ argparse prettytable -requests<1.0 +requests>=0.8 simplejson