aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-06-14 11:32:18 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-06-14 11:32:18 -0400
commitfd0d9ace552a4fce85abcc622bdec9dc27f8c57d (patch)
treeb527833a594509958eea2aead071e845dd23f630
parent39029c39265fa41750d39ec181200cd7379638d9 (diff)
downloadexternal_python_setuptools-fd0d9ace552a4fce85abcc622bdec9dc27f8c57d.tar.gz
external_python_setuptools-fd0d9ace552a4fce85abcc622bdec9dc27f8c57d.tar.bz2
external_python_setuptools-fd0d9ace552a4fce85abcc622bdec9dc27f8c57d.zip
Subclass dict rather that wrap and proxy.
-rw-r--r--pkg_resources.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 796fd9c3..323b28c8 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -1530,19 +1530,16 @@ class EmptyProvider(NullProvider):
empty_provider = EmptyProvider()
-class ZipManifests(object):
-
- def __init__(self):
- self.known = dict()
+class ZipManifests(dict):
def __call__(self, path):
path = os.path.normpath(path)
stat = os.stat(path)
- if path not in self.known or self.known[path][0] != stat.st_mtime:
- self.known[path] = (stat.st_mtime, self.build_manifest(path))
+ if path not in self or self[path][0] != stat.st_mtime:
+ self[path] = (stat.st_mtime, self.build_manifest(path))
- return self.known[path][1]
+ return self[path][1]
def build_manifest(self, path):
"""