From: Daniele Varrazzo Date: Mon, 1 Sep 2025 09:23:59 +0000 (+0200) Subject: chore(pool): use coro test from inspect instead of asyncio X-Git-Tag: 3.2.10~8^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d846c84aceb0d4531ec9d31c29b20d2778a1413;p=thirdparty%2Fpsycopg.git chore(pool): use coro test from inspect instead of asyncio The latter is deprecated in Python 3.14. --- diff --git a/psycopg_pool/psycopg_pool/pool_async.py b/psycopg_pool/psycopg_pool/pool_async.py index af725a8e4..f6c06df12 100644 --- a/psycopg_pool/psycopg_pool/pool_async.py +++ b/psycopg_pool/psycopg_pool/pool_async.py @@ -597,7 +597,9 @@ class AsyncConnectionPool(Generic[ACT], BasePool): return if True: # ASYNC - if asyncio.iscoroutinefunction(self._reconnect_failed): + import inspect + + if inspect.iscoroutinefunction(self._reconnect_failed): await self._reconnect_failed(self) else: self._reconnect_failed(self)