1. Michael Bayer
  2. sqlalchemy
  3. Issues

Issues

Issue #2421 resolved

py3 setup.py monkeypatch breaks setup.py develop for other 2to3-relying packages

Anonymous created an issue

On Python 3.2, currently when someone issues the following commands, they'll wind up with a completely uninformative setuptools error:

$ mkdir tmp
$ cd tmp
$ virtualenv3.2 env
$ env/bin/easy_install pyramid
$ env/bin/pcreate -s alchemy alch
$ virtualenv3.2 env2
$ cd alch
$ ../env2/bin/python setup.py develop

The error comes from setuptools/sandbox.py and provides no traceback object.

If the user reruns the "setup.py develop" step, the installation completes.

This happens because SQLAlchemy monkeypatches 2to3 and doesn't un-monkey-patch it. When another 2to3-using package tries to invoke 2to3 to run fixers (in the same process space), it fails.

Note that this is only true of "setup.py develop", not of "easy_install" for whatever reason.

A patch is attached which undoes the monkeypatch after SQLALchemy runs "run_setup()".

Comments (3)

  1. Log in to comment