diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-24 16:42:28 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-24 16:42:28 -0500 |
commit | 715085069e4882ee67d6898f12b975c05dd6b769 (patch) | |
tree | 7bfdb35d8664b690f4c6b2185170aec5c0a511b3 /setuptools | |
parent | 7b7f1ed5a7a8b14269dcc69de42e383558308030 (diff) | |
download | external_python_setuptools-715085069e4882ee67d6898f12b975c05dd6b769.tar.gz external_python_setuptools-715085069e4882ee67d6898f12b975c05dd6b769.tar.bz2 external_python_setuptools-715085069e4882ee67d6898f12b975c05dd6b769.zip |
Remove compatibility around reduce.
Diffstat (limited to 'setuptools')
-rwxr-xr-x | setuptools/sandbox.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py index 29fc07b8..27914f2e 100755 --- a/setuptools/sandbox.py +++ b/setuptools/sandbox.py @@ -1,4 +1,5 @@ import os, sys, tempfile, operator, pkg_resources +import functools if os.name == "java": import org.python.modules.posix.PosixModule as _os else: @@ -11,7 +12,7 @@ _open = open from distutils.errors import DistutilsError from pkg_resources import working_set -from setuptools.compat import builtins, execfile, reduce +from setuptools.compat import builtins, execfile __all__ = [ "AbstractSandbox", "DirectorySandbox", "SandboxViolation", "run_setup", @@ -276,7 +277,7 @@ class DirectorySandbox(AbstractSandbox): self._violation("os.open", file, flags, mode, *args, **kw) return _os.open(file,flags,mode, *args, **kw) -WRITE_FLAGS = reduce( +WRITE_FLAGS = functools.reduce( operator.or_, [getattr(_os, a, 0) for a in "O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARY".split()] ) |