-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Latest Flask-SQLAlchemy will cause an error when running make test. The error message is as follows:
self = <SQLAlchemy sqlite:////home/jinmiaoluo/repo/arch-security-tracker/tracker.db>, name = 'create_scoped_session' def __getattr__(self, name: str) -> t.Any:
if name == "db":
import warnings
warnings.warn(
"The 'db' attribute is deprecated and will be removed in"
" Flask-SQLAlchemy 3.1. The extension is registered directly as"
" 'app.extensions[\"sqlalchemy\"]'.",
DeprecationWarning,
stacklevel=2,
)
return self
if name == "relation":
return self._relation
if name == "event":
return sa.event
if name.startswith("_"):
raise AttributeError(name)
for mod in (sa, sa.orm):
if hasattr(mod, name):
return getattr(mod, name)
> raise AttributeError(name)
E AttributeError: create_scoped_session
.venv/lib/python3.11/site-packages/flask_sqlalchemy/extension.py:1005: AttributeError
Rolling back Flask-SQLAlchemy to 2.5.x allows unit tests to run smoothly.
diff --git a/requirements.txt b/requirements.txt
index 9519529..8c81793 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
Flask
Flask-Login
-Flask-SQLAlchemy
+Flask-SQLAlchemy~=2.5.0
Flask-Migrate
Flask-WTF
flask-talismanMetadata
Metadata
Assignees
Labels
No labels