You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
import typing as t
|
|
|
|
|
|
|
|
from .extension import SQLAlchemy
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
"SQLAlchemy",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def __getattr__(name: str) -> t.Any:
|
|
|
|
if name == "__version__":
|
|
|
|
import importlib.metadata
|
|
|
|
import warnings
|
|
|
|
|
|
|
|
warnings.warn(
|
|
|
|
"The '__version__' attribute is deprecated and will be removed in"
|
|
|
|
" Flask-SQLAlchemy 3.2. Use feature detection or"
|
|
|
|
" 'importlib.metadata.version(\"flask-sqlalchemy\")' instead.",
|
|
|
|
DeprecationWarning,
|
|
|
|
stacklevel=2,
|
|
|
|
)
|
|
|
|
return importlib.metadata.version("flask-sqlalchemy")
|
|
|
|
|
|
|
|
raise AttributeError(name)
|