diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-12-07 12:36:45 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-12-07 12:36:45 -0500 |
commit | d6902858957c1a979298478f02e0cfbf57e38314 (patch) | |
tree | ece0dda5b8f6563bffd33975d0642be1a363ef60 /setuptools | |
parent | 074fa0ecbe18b9908a29e6a22bfe99b924b3ab98 (diff) | |
download | python-setuptools-bitbucket-2.0.tar.gz |
Exempt lib2to3 pickled grammars from the DirectorySandboxing. Fixes #121.2.0
Diffstat (limited to 'setuptools')
-rwxr-xr-x | setuptools/sandbox.py | 7 |
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)) |