mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
[logging] deprecation notices for SQLite (#9662)
* [logging] deprecation notices for SQLite * [logging] use warning for SQLite notice * [logging] update grammar
This commit is contained in:
@@ -121,10 +121,14 @@ def get_query(query_id, session):
|
||||
@contextmanager
|
||||
def session_scope(nullpool):
|
||||
"""Provide a transactional scope around a series of operations."""
|
||||
if nullpool:
|
||||
engine = sqlalchemy.create_engine(
|
||||
app.config["SQLALCHEMY_DATABASE_URI"], poolclass=NullPool
|
||||
database_uri = app.config["SQLALCHEMY_DATABASE_URI"]
|
||||
if "sqlite" in database_uri:
|
||||
logger.warning(
|
||||
"SQLite Database support for metadata databases will be removed \
|
||||
in a future version of Superset."
|
||||
)
|
||||
if nullpool:
|
||||
engine = sqlalchemy.create_engine(database_uri, poolclass=NullPool)
|
||||
session_class = sessionmaker()
|
||||
session_class.configure(bind=engine)
|
||||
session = session_class()
|
||||
|
||||
Reference in New Issue
Block a user