With SQLAlchemy warnings enabled, SQLAlchemy 1.4 gives the following warning.
MovedIn20Warning: The declarative_base() function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
Base = declarative_base()
mbdata's requirements.txt does not specify any fixed SQLAlchemy version so we need to account for versions before 1.4 as well where this import does not exist.
With SQLAlchemy warnings enabled, SQLAlchemy 1.4 gives the following warning.
MovedIn20Warning: The
declarative_base()
function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 1.4) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) Base = declarative_base()The rationale of the move is explained here: https://docs.sqlalchemy.org/en/14/changelog/migration_20.html#declarative-becomes-a-first-class-api
mbdata's requirements.txt does not specify any fixed SQLAlchemy version so we need to account for versions before 1.4 as well where this import does not exist.