Skip to content

Commit 42c8c1a

Browse files
Add _async_soft_close method to AsyncAdapt_pyathena_cursor
SQLAlchemy 2.0.46 calls cursor._async_soft_close() in the async result handling path (_ensure_sync_result). Add a no-op implementation matching the pattern used by SQLAlchemy's own asyncpg adapter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2d551c2 commit 42c8c1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pyathena/aio/sqlalchemy/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ def fetchall(self) -> Any:
9393
def setinputsizes(self, sizes: Any) -> None:
9494
self._cursor.setinputsizes(sizes)
9595

96+
async def _async_soft_close(self) -> None:
97+
return
98+
9699
# PyAthena-specific methods used by AthenaDialect reflection
97100
def list_databases(self, *args: Any, **kwargs: Any) -> Any:
98101
return await_only(self._cursor.list_databases(*args, **kwargs))

0 commit comments

Comments
 (0)