File compat-newer-requests.patch of Package python-cinderclient

Patch slightly tweaked to apply to tarball.

commit 8d43cd9c016a364867bde7fa1d351081f1820905
Author: Chuck Short <chuck.short@canonical.com>
Date:   Tue Feb 5 09:45:46 2013 -0600

    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 <chuck.short@canonical.com>

diff --git a/cinderclient/client.py b/cinderclient/client.py
index c4dbdd9..d0f75d7 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 9da5f1a..3a12923 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -5,7 +5,6 @@ import testtools
 
 class TestCase(unittest2.TestCase):
     TEST_REQUEST_BASE = {
-        'config': {'danger_mode': False},
         'verify': True,
     }
 
diff --git a/tools/pip-requires b/tools/pip-requires
index fab4830..e708630 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -1,4 +1,4 @@
 argparse
 prettytable
-requests<1.0
+requests>=0.8
 simplejson
openSUSE Build Service is sponsored by