Skip to content

fix(flask_sqlalchemy): Correct deprecation warning in SQLAlchemy imports

Guillaume MARTINEZ requested to merge fix-sqlalchemy-deprecation-warnings into develop

What does this MR do and why?

fix(flask_sqlalchemy): Correct deprecation warning in SQLAlchemy imports

Logs

prod-manager/ProdManager/helpers/template.py:4: DeprecationWarning: 'Pagination' has been moved to 'pagination.Pagination'. The top-level import is deprecated and will be removed in Flask-SQLAlchemy 3.1.
  from flask_sqlalchemy import Pagination

prod-manager/tests/ProdManager/helpers/test_helpers_resource.py:6: DeprecationWarning: 'Pagination' has been moved to 'pagination.Pagination'. The top-level import is deprecated and will be removed in Flask-SQLAlchemy 3.1.
  from flask_sqlalchemy import Pagination, BaseQuery

prod-manager/tests/ProdManager/helpers/test_helpers_resource.py:6: DeprecationWarning: 'BaseQuery' has been moved and renamed to 'query.Query'. The top-level import is deprecated and will be removed in Flask-SQLAlchemy 3.1.
  from flask_sqlalchemy import Pagination, BaseQuery

MR acceptance checklist

  • My code follows the style guidelines of this project
  • I ran pylint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • My code needed automated testing. I have added them (this is optional task)
  • I have added user readable comment in the CHANGELOG
Edited by Guillaume MARTINEZ

Merge request reports