aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-12-07 12:36:45 -0500
committerJason R. Coombs <jaraco@jaraco.com>2013-12-07 12:36:45 -0500
commitd30d526eb40a4855a3589d895aac75900aedfc44 (patch)
tree15366506fa94551b2fd182fdb379ebd62cfa4650 /setuptools/sandbox.py
parentef565f9ddd20ca66d1c1ff57da4ceb91038010e0 (diff)
downloadexternal_python_setuptools-d30d526eb40a4855a3589d895aac75900aedfc44.tar.gz
external_python_setuptools-d30d526eb40a4855a3589d895aac75900aedfc44.tar.bz2
external_python_setuptools-d30d526eb40a4855a3589d895aac75900aedfc44.zip
Exempt lib2to3 pickled grammars from the DirectorySandboxing. Fixes #121.2.0
--HG-- extra : histedit_source : 6cd9a3c6003d3f6de2f8e676b61589db4dffafb0
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-xsetuptools/sandbox.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 26960846..042c5958 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -199,8 +199,11 @@ class DirectorySandbox(AbstractSandbox):
"utime", "lchown", "chroot", "mkfifo", "mknod", "tempnam",
])
- _exception_patterns = []
- "allow writing to paths that match the pattern"
+ _exception_patterns = [
+ # Allow lib2to3 to attempt to save a pickled grammar object (#121)
+ '.*lib2to3.*\.pickle$',
+ ]
+ "exempt writing to paths that match the pattern"
def __init__(self, sandbox, exceptions=_EXCEPTIONS):
self._sandbox = os.path.normcase(os.path.realpath(sandbox))