aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorJurko Gospodnetić <jurko.gospodnetic@pke.hr>2014-06-02 16:48:14 +0200
committerJurko Gospodnetić <jurko.gospodnetic@pke.hr>2014-06-02 16:48:14 +0200
commit2bd140300eb0aa63b78a930463ca4c81fa2546bb (patch)
tree10fc48309764e8f03a713c2a33e621ced0cbee23 /setuptools/command/easy_install.py
parenta82811aa0b9d0d74b546439ff740ce63403f1b84 (diff)
downloadexternal_python_setuptools-2bd140300eb0aa63b78a930463ca4c81fa2546bb.tar.gz
external_python_setuptools-2bd140300eb0aa63b78a930463ca4c81fa2546bb.tar.bz2
external_python_setuptools-2bd140300eb0aa63b78a930463ca4c81fa2546bb.zip
fix clearing zipimport._zip_directory_cache on pypy
pypy uses a custom zipimport._zip_directory_cache implementation class that does not support the complete dict interface, e.g. it does not support the dict.pop() method. For more detailed information see the following links: https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960 https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99 --HG-- extra : rebase_source : 95cff7946455f0a4422d97eecab11164a9ddef10
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 0bce4ab9..81158c43 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -1678,7 +1678,14 @@ def _replace_zip_directory_cache_data(normalized_path):
# documented anywhere and could in theory change with new Python releases)
# for no significant benefit.
for p in to_update:
- old_entry = cache.pop(p)
+ # N.B. pypy uses a custom zipimport._zip_directory_cache implementation
+ # class that does not support the complete dict interface, e.g. it does
+ # not support the dict.pop() method. For more detailed information see
+ # the following links:
+ # https://bitbucket.org/pypa/setuptools/issue/202/more-robust-zipimporter-cache-invalidation#comment-10495960
+ # https://bitbucket.org/pypy/pypy/src/dd07756a34a41f674c0cacfbc8ae1d4cc9ea2ae4/pypy/module/zipimport/interp_zipimport.py#cl-99
+ old_entry = cache[p]
+ del cache[p]
zipimport.zipimporter(p)
old_entry.clear()
old_entry.update(cache[p])