aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 4c2b9959..e03667e0 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -40,6 +40,7 @@ try:
except NameError:
basestring = str
from io import StringIO
+ from functools import reduce
exec_ = eval("exec")
def execfile(fn, globs=None, locs=None):
if globs is None:
@@ -47,8 +48,6 @@ except NameError:
if locs is None:
locs = globs
exec_(compile(open(fn).read(), fn, 'exec'), globs, locs)
- import functools
- reduce = functools.reduce
# capture these to bypass sandboxing
from os import utime
@@ -2315,7 +2314,7 @@ class EntryPoint(object):
def parse_map(cls, data, dist=None):
"""Parse a map of entry point groups"""
if isinstance(data,dict):
- data = list(data.items())
+ data = data.items()
else:
data = split_sections(data)
maps = {}
@@ -2493,7 +2492,8 @@ class Distribution(object):
self.insert_on(path)
if path is sys.path:
fixup_namespace_packages(self.location)
- list(map(declare_namespace, self._get_metadata('namespace_packages.txt')))
+ list(map(declare_namespace,
+ self._get_metadata('namespace_packages.txt')))
def egg_name(self):
@@ -3009,4 +3009,3 @@ run_main = run_script # backward compatibility
add_activation_listener(lambda dist: dist.activate())
working_set.entries=[]; list(map(working_set.add_entry,sys.path)) # match order
-