Problem
core/database.py imports from the legacy sqlalchemy.ext.declarative location:
from sqlalchemy.ext.declarative import declarative_base, declared_attr
On SQLAlchemy 2.0 this emits a MovedIn20Warning on every import of core.database:
MovedIn20Warning: The declarative_base() function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0)
Fix
Both names are re-exported from sqlalchemy.orm (verified on 2.0.50):
from sqlalchemy.orm import declarative_base, declared_attr
No behavioral change — same objects, current import path, warning gone.
Notes
Problem
core/database.pyimports from the legacysqlalchemy.ext.declarativelocation:On SQLAlchemy 2.0 this emits a
MovedIn20Warningon every import ofcore.database:Fix
Both names are re-exported from
sqlalchemy.orm(verified on 2.0.50):No behavioral change — same objects, current import path, warning gone.
Notes