"python flask.ext.mysql is deprecated?" Code Answer

4

flask.ext. is a deprecated pattern which was used prevalently in older extensions and tutorials. the warning is telling you to replace it with the direct import, which it guesses to be flask_mysql. however, flask-mysql is using an even more outdated pattern, flaskext.. there is nothing you can do about that besides convincing the maintainer to release a new version that fixes it. from flaskext.mysql import mysql should work and avoid the warning, although preferably the package would be updated to use flask_mysql instead.

By Fabio Cardoso on September 3 2022

Answers related to “python flask.ext.mysql is deprecated?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.