Restored SQLAlchemy 0.7 support