Skip to content

Upgrading asyncpg 0.31 to 0.32

Breaking0.31.0 → 0.32.0Breaking2Platform1Changed4Fixed15Other4

BreakingUpgrade verdict

2 breaking changes and a platform requirement change.

  • Connection pools now keep at least min_size connections alive instead of letting them drain to zero, and a new init_size option sets how many connections open at startup.
  • Aligns SSL startup retries with libpq and requires sslmode=require, verify-ca, verify-full, or an explicit SSLContext for direct TLS.
  • The library now works with the upcoming Python 3.15 release.
3 items need code or config changes
Breaking2
Makes pool min_size a maintained connection floor and adds init_size to control connections opened at startup.
min_sizeinit_size
Aligns SSL startup retries with libpq and requires sslmode=require, verify-ca, verify-full, or an explicit SSLContext for direct TLS.
sslmodeSSLContext
Platform1
Adds support for Python 3.15.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • changed: constructor Pool(*connect_args, min_size, max_size, max_queries, max_inactive_connection_lifetime, connect=…, setup=…, init=…, reset=…, loop, connection_class, record_class, **connect_kwargs) → constructor Pool(*connect_args, init_size=…, min_size, max_size, max_queries, max_inactive_connection_lifetime, connect=…, setup=…, init=…, reset=…, loop, connection_class, record_class, **connect_kwargs)
  • changed: function create_pool(dsn=…, *, min_size=…, max_size=…, max_queries=…, max_inactive_connection_lifetime=…, connect=…, setup=…, init=…, reset=…, loop=…, connection_class=…, record_class=…, **connect_kwargs) → function create_pool(dsn=…, *, init_size=…, min_size=…, max_size=…, max_queries=…, max_inactive_connection_lifetime=…, connect=…, setup=…, init=…, reset=…, loop=…, connection_class=…, record_class=…, **connect_kwargs)
  • added: method Pool.get_init_size()