summaryrefslogtreecommitdiff
path: root/pip/_vendor/requests/packages/urllib3/_collections.py
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2014-12-01 18:48:38 -0500
committerDonald Stufft <donald@stufft.io>2014-12-02 00:22:14 -0500
commit0bde4fb9c3272dca277aea483d2c5dde65764ba5 (patch)
tree7abb860fe5f2eaaec3dce9114bd7f25eab5cc1cc /pip/_vendor/requests/packages/urllib3/_collections.py
parent0c2bf1ae977bf6d6392446fe143f32b9de5d1524 (diff)
downloadpip-0bde4fb9c3272dca277aea483d2c5dde65764ba5.tar.gz
Upgrade the bundled requests to 2.5.0
Diffstat (limited to 'pip/_vendor/requests/packages/urllib3/_collections.py')
-rw-r--r--pip/_vendor/requests/packages/urllib3/_collections.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pip/_vendor/requests/packages/urllib3/_collections.py b/pip/_vendor/requests/packages/urllib3/_collections.py
index d77ebb8df..784342a4e 100644
--- a/pip/_vendor/requests/packages/urllib3/_collections.py
+++ b/pip/_vendor/requests/packages/urllib3/_collections.py
@@ -14,7 +14,7 @@ try: # Python 2.7+
from collections import OrderedDict
except ImportError:
from .packages.ordered_dict import OrderedDict
-from .packages.six import itervalues
+from .packages.six import iterkeys, itervalues
__all__ = ['RecentlyUsedContainer', 'HTTPHeaderDict']
@@ -85,8 +85,7 @@ class RecentlyUsedContainer(MutableMapping):
def clear(self):
with self.lock:
# Copy pointers to all values, then wipe the mapping
- # under Python 2, this copies the list of values twice :-|
- values = list(self._container.values())
+ values = list(itervalues(self._container))
self._container.clear()
if self.dispose_func:
@@ -95,7 +94,7 @@ class RecentlyUsedContainer(MutableMapping):
def keys(self):
with self.lock:
- return self._container.keys()
+ return list(iterkeys(self._container))
class HTTPHeaderDict(MutableMapping):