Skip to content

Commit 9e1eec9

Browse files
authored
fix: Addresses SA warnings (#97)
1 parent e01aa85 commit 9e1eec9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/firebolt_db/firebolt_dialect.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ class FireboltDialect(default.DefaultDialect):
119119
supports_empty_insert = False
120120
supports_unicode_statements = True
121121
supports_unicode_binds = True
122+
supports_statement_cache = False
123+
# supports_statement_cache Set to False to disable warning
124+
# https://sqlalche.me/e/20/cprf
122125
returns_unicode_strings = True
123126
description_encoding = None
124127
supports_native_boolean = True
@@ -131,7 +134,11 @@ def __init__(
131134
self.context: Union[ExecutionContext, Dict] = context or {}
132135

133136
@classmethod
134-
def dbapi(cls) -> ModuleType:
137+
def import_dbapi(cls) -> ModuleType: # For sqlalchemy >= 2.0.0
138+
return dbapi
139+
140+
@classmethod
141+
def dbapi(cls) -> ModuleType: # Kept for backwards compatibility
135142
return dbapi
136143

137144
def create_connect_args(self, url: URL) -> Tuple[List, Dict]:

0 commit comments

Comments
 (0)