usage of sqlalchemy in patterns documentation
MohammadMMoniri opened this issue · 1 comments
If you are using SQLAlchemy version 2.0.0 or above and are following the Flask documentation on creating a base class for models using the declarative_base()
function, you should be aware that this function is now deprecated and will be removed in a future release.
To address this issue, you can replace the use of declarative_base()
with the new orm.declarative_base()
function, which is available in SQLAlchemy 2.0.0 and above. This new function provides the same functionality as the old declarative_base()
function but is not deprecated.
alert of SQLAlchemy:
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)
Environment:
- Python version: 3.10.6
- Flask version: 2.3.2
- SQLAlchemy: 2.0.16
Happy to review a PR