The declarative_base() function got moved from sqlalchemy.ext.declarative to sqlalchemy.orm. SQLAlchemy >= 2.0 raises a deprecation warning for this:
lib/python3.11/site-packages/sqlalchemy_celery_beat/session.py:36: MovedIn20Warning: The ``declarative_base()`` function is now available as sqlalchemy.orm.declarative_base(). (deprecated since: 2.0) (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
ModelBase = declarative_base(cls=Base)
Changing the import in session.py (from sqlalchemy.orm import sessionmaker, declarative_base) fixes it and still works on the minimum SQLAlchemy version (1.4.0).
The
declarative_base()function got moved fromsqlalchemy.ext.declarativetosqlalchemy.orm. SQLAlchemy >= 2.0 raises a deprecation warning for this:Changing the import in
session.py(from sqlalchemy.orm import sessionmaker, declarative_base) fixes it and still works on the minimum SQLAlchemy version (1.4.0).