From d701e11a392b0e3b93b7af4a05c1cdadddf75f8f Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Tue, 6 Oct 2026 11:23:45 -0700 Subject: [PATCH] asyncpg v0.32.0 ## Improvements * Support Python 3.15 (#1367, #1378) (by @elprans in 1b118464 and 58c0c595) * Support PostgreSQL 19 (#1379) (by @elprans in 8d2a5aed) * Make pool `min_size` a maintained connection floor and add `init_size` to control the number of connections opened at startup (#1323). Idle connections at or below `min_size` are retained, and closed connections are replaced in the background. `init_size` defaults to `min_size`. To preserve the previous behavior, where the pool could drain to zero, replace `min_size=N` with `init_size=N, min_size=0`. (by @shatilov-diman in 67a1cbc5) * Use `hashlib.pbkdf2_hmac()` for faster SCRAM password derivation (#1359) (by @twelfthlabor in 00319a9b) * Use the statement cache for `copy_records_to_table()` introspection (#1360) (by @matemax in dd058652) ## Fixes * Clean up connections rejected by `target_session_attrs` immediately so an unresponsive rejected host cannot delay the selected connection, and cleanup tasks cannot outlive the event loop. Rejected connections are aborted without waiting for a graceful disconnect; servers may log "unexpected EOF on client connection" if the Terminate message is not delivered before the transport closes. * Fix a connection pool deadlock when releasing a connection after a protocol abort (#1324) (by @pchaseh in 4a83cc2f) * Honor `Connection.close(timeout=...)` while waiting for a pending cancellation (#1361) (by @gyanu2507 in c06bcb4d) * Prevent stuck cancellation from blocking connection teardown or pool release by bounding cancellation with the command or release timeout (#1370) (by @elprans in 4cf02203) * Preserve the server error when the connection closes mid-operation (#1369) (by @RitiGrover in 6c8f1a7a) * Fix COPY cleanup when a records generator raises, preserving the original exception and avoiding protocol desynchronization and stalled rollback (#1358) (by @CodingCossack in fdc6bc8f) * Reparse unnamed statements before cursor binding when the statement cache is disabled (#1364) (by @elprans in 302ba496) * Allow cursors in transactions started outside `Connection.transaction()`, such as with an explicit `BEGIN` (#1350) (by @aryansk in 25aaaf54) * Remove the query logger when the `query_logger()` block raises (#1373) (by @kratos0718 in 6a7fbd3e) * Fix a segfault in `Record.get()` with an invalid number of positional arguments (#1333) (by @apoorvdarshan in 40a38320) * Align SSL startup retries with libpq and improve SSL rejection diagnostics (#1366). Retry alternative transports only before authentication succeeds. Direct TLS now requires `sslmode=require`, `verify-ca`, or `verify-full`, or an explicit `SSLContext`. (by @elprans in 78752c9c) * Preserve password errors during SSL fallback when the fallback fails with a less specific authorization error (#1331) (by @Mauricio0129 in 2d979472) * Handle cleartext password authentication when no password is supplied without raising an `AttributeError` (#1351) (by @aryansk in 6be59154) * Set the `postgresql` ALPN protocol on SSL contexts created by asyncpg so direct TLS connections work with PostgreSQL 17 and later (#1372). User-provided contexts must set this protocol for direct TLS connections. (by @DurandA in b21325d2) * Link explicitly against `libm` on non-Windows platforms to fix undefined math symbol errors when loading the extensions (#1305) (by @veeceey in db8ecc2a) * Fix builds on FreeBSD 15 by linking against `libstdthreads` (#1368) (by @elprans in 87bcaf97) ## Other * Replace `pkg_resources` with `packaging` in `setup.py` (#1362) (by @elprans in 6695db76) * Build Linux and macOS ARM64 wheels on native runners and add Windows ARM64 wheel builds (#1308) (by @ddelange in 1e8cc1c4) * Add manual and PR-label-triggered dry runs to the release workflow (#1374) (by @elprans in 1bd643e1) * Clarify how `execute()` uses prepared statements and how to confirm an `INSERT` in the documentation (#1336) (by @pctablet505 in cdf816c4) * Fix typos in comments and docstrings (#1332) (by @maxtaran2010 in bc3e2462) --- asyncpg/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asyncpg/_version.py b/asyncpg/_version.py index 738da168..6b54269c 100644 --- a/asyncpg/_version.py +++ b/asyncpg/_version.py @@ -14,4 +14,4 @@ import typing -__version__: typing.Final = '0.32.0.dev0' +__version__: typing.Final = '0.32.0'