SQLAlchemy 0.9 compatibility