SQLalchemy and Py2exe

If you want to use the absolutely awesome SQLalchemy orm for Python with py2exe to generate Windows executables you might run into the trouble of name collisions with sqlalchemy not being able to import its own “logging” module.

It basically a bug between SQLalchemy and py2exe that treat imports incompatible so you have to patch SQLalchemy to rename its internal logging module. I created a patch against the current stable version of SQLalchemy (0.4.5) so if you have similar issues you can get it here.