1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #317 invalid

easy_install fails with SandboxViolation on Python 3.3

Tomi Pieviläinen
created an issue

easy_install fails with Python 3.3rc1, when lib2to3 is imported in setuptools/command/build_py.py. Python 3.3 source install modifies/installs lib2to3/Grammar.txt after modifying Grammar3.3.0.candidate.1.pickle:

{{{ -rw-r--r--. 1 root root 6589 2012-08-27 13:25:33.190414570 +0300 Grammar.txt -rw-r--r--. 1 root root 20622 2012-08-27 13:25:33.150477192 +0300 Grammar3.3.0.candidate.1.pickle }}}

This causes lib2to3/pgen2/driver:load_grammar to try to recreate the pickle (the _newer call on line 119 returns false), which triggers SandboxViolation in distribute.

If IOError would be raised, like normally when trying to write to a file with no write access, the load_grammar would just use the generated grammar without saving, and installation would work fine.

Of course this might also be a bug in Python itself, as older Python versions installed Grammar.txt before the pickles.

Comments (6)

  1. Log in to comment