Skip to content

Undocumented breaking change in 5.0 for SQLA import. #2401

@jlayt

Description

@jlayt

When upgrading to FAB 5.0, I get the following error:

ImportError: cannot import name 'SQLA' from 'flask_appbuilder'

This is a breaking change that is not listed in the docs at https://flask-appbuilder.readthedocs.io/en/latest/versionmigration.html, and the docs minimal example at https://flask-appbuilder.readthedocs.io/en/latest/quickminimal.html still has the old import as well.

Looking at the actual code minimal example at https://github.com/dpgaspar/Flask-AppBuilder/blob/master/examples/quickminimal/run.py this seems to have been replaced by flask_appbuilder.utils.legacy.get_sqla_class(). This is not documented anywhere.

Change is here:
2d5fa08#diff-bbd6352f359c3513df0d1a20e00a1079638ca7f567470c4631e19f2875c0ee2fL10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions