asyncpg v0.16.0
Behavior Changes
Pool.close()
now waits until all acquired connections are released.
Hence, the below code will now hang indefinitely:
conn = await pool.acquire()
await pool.close()
Asyncpg will log a warning if pool.close()
takes over 60 seconds to
complete. It is advisable to use asyncio.wait_for()
to set a timeout.
Improvements
-
Add support for reading passwords from .pgpass
(by @elprans in 55a372f for #267) -
Add
Connection.is_in_transaction()
(#297)
(by @bcaudell95 in cf523be for #297) -
Allow setting custom codecs on domains and enumerated types
(by @elprans in 3139322) -
Allow passing
datetime.date
instances as timestamp input
(by @elprans in e8cc627 for #288) -
Implement support for pool connection rotation
(by @elprans in 4d209b7 for #291)
Bug Fixes
-
Prohibit non-iterable containers to be passed as array input
(by @elprans in a2fa7b2) -
Decode numeric zeros with correct scale
(by Dmitriy Chugunov in 4124f7d) -
Fix handling of OIDs >= 2**31
(by @elprans in 8dd7a6c for #279) -
Make
Pool.close()
wait until all checked out connections are released
(by @elprans in 7a0585a for #290) -
Fix type codec cache races
(by @elprans in 482a186 for #278) -
Raise a consistent exception on input encoding errors
(by @elprans in 0ddfa46 for #260)