sqlalchemy-imageattach
sqlalchemy-imageattach copied to clipboard
Incompatible with sqlalchemy 1.4.x
I see this test failure when running them against sqlalchemy 1.4.18:
sqlalchemy_imageattach/migration.py:5: in <module>
from sqlalchemy.ext.declarative.api import DeclarativeMeta
E ModuleNotFoundError: No module named 'sqlalchemy.ext.declarative.api'
https://docs.sqlalchemy.org/en/14/orm/extensions/declarative/api.html
I came across your issue. Just wanted to let you know that I managed to use this library with SQLAlchemy 1.4 The test error is related to a wrong import in the store migration functionality, which you hopefully don't need. It can be solved by changing the import on line 5 of the migration.py file to:
from sqlalchemy.orm.decl_api import DeclarativeMeta
@CTHRU Thank you for solution. I also needed to change line 60 in migration.py file to:
for cls in declarative_base.registry._class_registry.values()
sqlalchemy v 1.4.44