summaryrefslogtreecommitdiff
path: root/swiftclient/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r--swiftclient/client.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index f071182..4be2e2d 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -74,8 +74,10 @@ except ImportError:
pass
# requests version 1.2.3 try to encode headers in ascii, preventing
-# utf-8 encoded header to be 'prepared'
-if StrictVersion(requests.__version__) < StrictVersion('2.0.0'):
+# utf-8 encoded header to be 'prepared'. This also affects all
+# (or at least most) versions of requests on py3
+if StrictVersion(requests.__version__) < StrictVersion('2.0.0') \
+ or not six.PY2:
from requests.structures import CaseInsensitiveDict
def prepare_unicode_headers(self, headers):