Skip to content

Commit

Permalink
fix: Addresses SA warnings (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianosrp authored Apr 19, 2024
1 parent e01aa85 commit 9e1eec9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/firebolt_db/firebolt_dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class FireboltDialect(default.DefaultDialect):
supports_empty_insert = False
supports_unicode_statements = True
supports_unicode_binds = True
supports_statement_cache = False
# supports_statement_cache Set to False to disable warning
# https://sqlalche.me/e/20/cprf
returns_unicode_strings = True
description_encoding = None
supports_native_boolean = True
Expand All @@ -131,7 +134,11 @@ def __init__(
self.context: Union[ExecutionContext, Dict] = context or {}

@classmethod
def dbapi(cls) -> ModuleType:
def import_dbapi(cls) -> ModuleType: # For sqlalchemy >= 2.0.0
return dbapi

@classmethod
def dbapi(cls) -> ModuleType: # Kept for backwards compatibility
return dbapi

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

0 comments on commit 9e1eec9

Please sign in to comment.