Unable to import 'get_recorded_queries' function any more after upgrade from 3.0.5 to 3.1.1
colinet opened this issue · comments
I used to track SQL queries issued by Flask-SQLAlchemy at end of each request.
Since I upgraded to Flask-SQLAlchemy==3.1.1 (from Flask-SQLAlchemy==3.0.5), I get the following import error:
...
File "/srv/api/common/auth.py", line 6, in <module>
from flask_sqlalchemy import get_recorded_queries
ImportError: cannot import name 'get_recorded_queries' from 'flask_sqlalchemy'
(/srv/api/venv/lib/python3.11/site-packages/flask_sqlalchemy/__init__.py)
Documentation of Flask-SQLAlchemy does not report any change from 3.0.5 to 3.1.1 about this function.
Environment:
- Python version: 3.11.5
- Flask-SQLAlchemy version: 3.1.1
- SQLAlchemy version: 2.0.21
Check the changelog and docs for the deprecation and rename information.