diff options
author | Christopher Baines <mail@cbaines.net> | 2015-12-22 14:09:50 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2015-12-22 14:09:50 +0000 |
commit | dff63335f212d32d7c1a4bb5276f2d31f5995ea1 (patch) | |
tree | 4b32f426e18fec38cbfa9468d0dfc0cbf2279363 /urllib3/_collections.py | |
parent | 2b3d330a120a16e97cecd5163b5d454dcfe38a2b (diff) | |
download | python-urllib3-dff63335f212d32d7c1a4bb5276f2d31f5995ea1.tar python-urllib3-dff63335f212d32d7c1a4bb5276f2d31f5995ea1.tar.gz |
Import python-urllib3_1.13.1.orig.tar.gzupstream/1.13.1upstream
Diffstat (limited to 'urllib3/_collections.py')
-rw-r--r-- | urllib3/_collections.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/urllib3/_collections.py b/urllib3/_collections.py index b68b9a5..67f3ce9 100644 --- a/urllib3/_collections.py +++ b/urllib3/_collections.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import from collections import Mapping, MutableMapping try: from threading import RLock @@ -167,7 +168,7 @@ class HTTPHeaderDict(MutableMapping): def __ne__(self, other): return not self.__eq__(other) - if not PY3: # Python 2 + if not PY3: # Python 2 iterkeys = MutableMapping.iterkeys itervalues = MutableMapping.itervalues @@ -234,7 +235,7 @@ class HTTPHeaderDict(MutableMapping): """ if len(args) > 1: raise TypeError("extend() takes at most 1 positional " - "arguments ({} given)".format(len(args))) + "arguments ({0} given)".format(len(args))) other = args[0] if len(args) >= 1 else () if isinstance(other, HTTPHeaderDict): @@ -304,7 +305,7 @@ class HTTPHeaderDict(MutableMapping): return list(self.iteritems()) @classmethod - def from_httplib(cls, message): # Python 2 + def from_httplib(cls, message): # Python 2 """Read headers from a Python 2 httplib message object.""" # python2.7 does not expose a proper API for exporting multiheaders # efficiently. This function re-reads raw lines from the message |