Issue #249 resolved

2to3 fixer exemption mechanism needed

Jason R. Coombs
created an issue

Sometimes 2to3 fixers are too aggressive and need to be disabled. For example, in jaraco.util, the fix_import 2to3 fixer causes problems and is unnecessary as forward-compatible imports are already used. Therefore, the distribute 2to3 utility needs a way to disable these fixers when they cause problems.

Currently, there is no such mechanism, and the jaraco.util project addresses this by [[|removing the fixers programmatically]].

Unfortunately, this technique will fail with a SandboxViolation if the lib2to3.gram module has not been previously imported (as it writes files to the lib2to3 directory on first import).

{{{ Processing Running jaraco.util-3.9.1/ -q bdist_egg --dist-dir /tmp/easy_install-umJccq/jaraco.util-3.9.1/egg-dist-tmp-4DDYpQ error: SandboxViolation: open('/usr/lib/python2.7/lib2to3/', 'wb') {} }}}

If distribute had a fixer exemption mechanism, it should sidestep the SandboxViolation.

Comments (1)

  1. Log in to comment