Skip to content

Commit 86d8e86

Browse files
authored
fix: Specify async queue pool for async dialect (#99)
1 parent 9e1eec9 commit 86d8e86

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/firebolt_db/firebolt_async_dialect.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77

88
import firebolt.async_db as async_dbapi
99
from firebolt.async_db import Connection
10+
from sqlalchemy.engine import AdaptedConnection # type: ignore[attr-defined]
1011

1112
# Ignoring type since sqlalchemy-stubs doesn't cover AdaptedConnection
1213
# and util.concurrency
13-
from sqlalchemy.engine import AdaptedConnection # type: ignore[attr-defined]
14+
from sqlalchemy.pool import AsyncAdaptedQueuePool # type: ignore[attr-defined]
1415
from sqlalchemy.util.concurrency import await_only # type: ignore[import]
1516
from trio import run
1617

@@ -167,6 +168,7 @@ class AsyncFireboltDialect(FireboltDialect):
167168
supports_statement_cache: bool = False
168169
supports_server_side_cursors: bool = False
169170
is_async: bool = True
171+
poolclass = AsyncAdaptedQueuePool
170172

171173
@classmethod
172174
def dbapi(cls) -> AsyncAPIWrapper:

0 commit comments

Comments
 (0)