1. PyPA
  2. Python Packaging Authority Projects
  3. setuptools

Commits

Jason R. Coombs  committed 0bb1df9

Exempt lib2to3 pickled grammars from the DirectorySandboxing. Fixes #121.

  • Participants
  • Parent commits 9bb4150
  • Branches default
  • Tags 2.0

Comments (0)

Files changed (2)

File CHANGES.txt

View file
  • Ignore whitespace
 2.0
 ---
 
+* Issue #121: Exempt lib2to3 pickled grammars from DirectorySandbox.
 * Issue #41: Dropped support for Python 2.4 and Python 2.5. Clients requiring
   setuptools for those versions of Python should use setuptools 1.x.
 * Removed ``setuptools.command.easy_install.HAS_USER_SITE``. Clients

File setuptools/sandbox.py

View file
  • Ignore whitespace
         "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))