Asyncpg

Latest version: v0.30.0

Safety actively analyzes 710821 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

0.18.2

Not secure
Bug Fixes
---------

* Revert "Stop treating ReadyForQuery as a universal result indicator"
to fix stability regression.
(by elprans in 04b67480)

* Correctly ignore all incoming messages after the Terminate message
(by elprans in 787317fb)

* Properly cleanup connections closed by remote
(by elprans in 4393a159 for 385)

0.18.1

Not secure
Bug Fixes
---------

* Fix DSN parsing regression
(by elprans in 8b98e7b4)

0.18.0

Not secure
Improvements
------------

* Implement `Record.get()`
(by elprans in 2b93ee55 for 330)

* Internal asyncpg errors are now consistently raised as
`InternalClientError` (by elprans in 263de3ff)

* Allow mappings as composite type input
(by elprans in eaa2fa1a for 349)

* Add `BitString.to_int()` and `BitString.from_int()`
(by percontation in ffd134e8)

* Allow 'sslmode' in DSNs
(by percontation in 0304288e)

* Add support for specifying multiple host addresses when connecting
(by elprans in 1d650ed9 for 257)

* Low-level protocol implementation has been tweaked and
optimized for slightly better performance in certain scenarios
(by elprans in 7a816138 and cc053fe5)

* Queries with cached statements now generate fewer TCP packets
(by aleksey-mashanov in bf071996)

* Allow aliasing builtin types by name in `set_builtin_type_codec()`
(by elprans in 687127ed)

* Factor out generic PostgreSQL protocol helpers into a separate package
(by 1st1 in f0adefc7)

* Fix tests and enable CI for PostgreSQL 11
(by elprans in ddb0ec29 and 716fd9d3)


Bug Fixes
---------

* Handle and ignore permission errors when attempting to read .pgpass
(by elprans in df7830f0 for 356)

* Fix decoding of fractional timestamps before Postgres epoch
(by elprans in a7eaf2b3 for 363)

0.17.0

Not secure
Improvements
------------

Official support for Python 3.7.

Bug Fixes
---------

* Fix garbage collection of connections and emit a `ResourceWarning`
if an unclosed connection is garbage collected.
(by 1st1 in d9a236e7 for 323)

* Raise a clear error if there's a race in pool intialization.
(by 1st1 in 3565ef8c for 320)

* Channel names in `Connection.add_listener()` and
`Connection.remove_listener()` are now quoted properly.
(by sqwishy in 3e6ade62)

* Fixed endianness detection on *BSD systems.
(by elprans in 8c83add4 for 313)

* Fixed handling of large type OIDs.
(by elprans in 2624bdb9 for 300)

0.16.0

Not secure
Behavior Changes
----------------

`Pool.close()` now waits until all acquired connections are released.
Hence, the below code will now hang indefinitely:

python
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 55a372fc for 267)

* Add `Connection.is_in_transaction()` (297)
(by bcaudell95 in cf523be7 for 297)

* Added codec for built-in type tid
(by fantix in cddea9c1)

* Allow setting custom codecs on domains and enumerated types
(by elprans in 3139322a)

* Allow passing `datetime.date` instances as timestamp input
(by elprans in e8cc627a for 288)

* Implement support for pool connection rotation
(by elprans in 4d209b75 for 291)


Bug Fixes
---------

* Prohibit non-iterable containers to be passed as array input
(by elprans in a2fa7b23)

* Decode numeric zeros with correct scale
(by Dmitriy Chugunov in 4124f7d2)

* Fix handling of OIDs >= 2**31
(by elprans in 8dd7a6cb for 279)

* Make `Pool.close()` wait until all checked out connections are released
(by elprans in 7a0585ac for 290)

* Fix type codec cache races
(by elprans in 482a1866 for 278)

* Raise a consistent exception on input encoding errors
(by elprans in 0ddfa466 for 260)

0.15.0

Not secure
Behavior Changes
----------------

asyncpg no longer uses the common statement cache for explicit
prepared statements, so `Connection.prepare()` always returns a
new prepared statement (by vangheem in a19ce50f).

Bug Fixes
---------

* Initialize statement codecs immediately after Prepare
(by elprans in 803c1155 for 241)

* Fix server version parsing when it contains trailing data
(by elprans in 05dce25f for 250)

Page 3 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.