codekingpro/portable-devtools
114k
1from __future__ import annotations2 3import typing as t4 5from .extension import SQLAlchemy6 7__all__ = [8 "SQLAlchemy",9]10 11 12def __getattr__(name: str) -> t.Any:13 if name == "__version__":14 import importlib.metadata15 import warnings16 17 warnings.warn(18 "The '__version__' attribute is deprecated and will be removed in"19 " Flask-SQLAlchemy 3.2. Use feature detection or"20 " 'importlib.metadata.version(\"flask-sqlalchemy\")' instead.",21 DeprecationWarning,22 stacklevel=2,23 )24 return importlib.metadata.version("flask-sqlalchemy")25 26 raise AttributeError(name)27 