aiokitchen / hasql

hasql - is a library for high available PostgreSQL clusters.
Apache License 2.0
42 stars 7 forks source link

AttributeError with asyncpg v0.29.0 #10

Closed ns-vmaisonneuve closed 11 months ago

ns-vmaisonneuve commented 12 months ago

A new release of asyncpg has just been published. It looks like the attribute asyncpg.Pool._working_addr does not exist any more (https://github.com/MagicStack/asyncpg/commit/4ddb039746a99b31cc4724329dd600b87a3f9469). But this attribute is expected in the method hasql.PoolManager.host (https://github.com/aiokitchen/hasql/blob/ecbf8576a0aa9f8e958b53b5a4f0a6f1736bf54a/hasql/asyncpg.py#L45C1-L47). This results in an AttributeError when using the latest version of asyncpg.

    def host(self, pool: asyncpg.Pool):
>       addr, _ = pool._working_addr
E       AttributeError: 'Pool' object has no attribute '_working_addr'