diff --git a/novaclient/client.py b/novaclient/client.py index 225b68d54..0e0afebe5 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -44,10 +44,6 @@ class HTTPClient(object): USER_AGENT = 'python-novaclient' - requests_config = { - 'danger_mode': False, - } - def __init__(self, user, password, projectid, auth_url=None, insecure=False, timeout=None, proxy_tenant_id=None, proxy_token=None, region_name=None, @@ -104,7 +100,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 use_token_cache(self, use_it): self.os_cache = use_it @@ -167,7 +164,6 @@ class HTTPClient(object): method, url, verify=self.verify_cert, - config=self.requests_config, **kwargs) self.http_log_resp(resp) diff --git a/tests/test_client.py b/tests/test_client.py index ca21fb0ce..ecc9606f5 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -43,8 +43,7 @@ class ClientTest(utils.TestCase): requests.request.assert_called_with(mock.ANY, mock.ANY, timeout=2, headers=mock.ANY, - verify=mock.ANY, - config=mock.ANY) + verify=mock.ANY) def test_get_client_class_v2(self): output = novaclient.client.get_client_class('2') diff --git a/tests/utils.py b/tests/utils.py index d3a744219..11bff80e1 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 7fbcbbe7c..ee904d4a3 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -1,5 +1,5 @@ argparse iso8601>=0.1.4 prettytable>=0.6,<0.7 -requests<1.0 +requests>=0.8 simplejson