---
title: "asyncpg 0.32.0 Breaking Changes on PyPI | Since.dev"
description: "What each asyncpg release removed, renamed or changed: 35 breaking changes in 3 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/asyncpg
last_updated: 2026-12-04
---

# asyncpg breaking changes

asyncpg 0.32.0 (October 6, 2026) is its newest release with breaking changes, 5 of them. The first: Behavior changed min_size. Every breaking API change we have recorded in asyncpg on PyPI: 35 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `0.32.0`, released October 6, 2026. [Source repository](https://github.com/MagicStack/asyncpg)

Its 0.31.0 release drops [Python 3.8](https://since.dev/calendar/python/3.8.md). [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.30.0](#v-0-30-0) to [0.32.0](#v-0-32-0): 22 breaking changes in 2 versions.

## asyncpg 0.32.0 breaking changes

asyncpg 0.32.0, released October 6, 2026: 5 breaking changes.

- **Behavior changed** `min_size`  

Idle connections at or below min_size are now kept and closed connections are replaced in the background. To keep the old behavior where the pool could drain to zero, use init_size=N, min_size=0 in place of min_size=N. [github.com](https://github.com/MagicStack/asyncpg/releases/tag/v0.32.0)
- **Configuration changed**  

asyncpg now sets the postgresql ALPN protocol on the SSL contexts it creates. A user-provided SSLContext used for direct TLS must set this protocol itself. [github.com](https://github.com/MagicStack/asyncpg/releases/tag/v0.32.0)
- **Configuration changed** `sslmode`  

Direct TLS connections now require sslmode set to require, verify-ca, or verify-full, or an explicit SSLContext. Configurations that relied on other settings must be updated. [github.com](https://github.com/MagicStack/asyncpg/releases/tag/v0.32.0)
- **Signature changed** `asyncpg.create_pool`  

Was def create_pool(dsn=None, \*, min_size=10, max_size=10, max_queries=50000, max_inactive_connection_lifetime=300.0, connect=None, setup=None, init=None, reset=None, loop=None, connection_class=connection.Connection... [pypi.org](https://pypi.org/project/asyncpg/0.32.0/)
- **Signature changed** `asyncpg.Pool.__init__`  

Was def \_\_init\_\_(self, \*connect_args, min_size, max_size, max_queries, max_inactive_connection_lifetime, connect=None, setup=None, init=None, reset=None, loop, connection_class, record_class, \*\*connect_kwargs); now def \_\_init\_\_(self... [pypi.org](https://pypi.org/project/asyncpg/0.32.0/)

## asyncpg 0.31.0 breaking changes

asyncpg 0.31.0, released November 24, 2025: 17 breaking changes.

- **Removed**  

Python 3.8 is no longer supported; users on Python 3.8 must upgrade Python to keep using this release. [github.com](https://github.com/MagicStack/asyncpg/releases/tag/v0.31.0)
- **Behavior changed** `prepare`  

When the statement cache is disabled, prepare() now defaults to unnamed statements; code relying on named prepared statements must opt in. [github.com](https://github.com/MagicStack/asyncpg/releases/tag/v0.31.0)
- **Signature changed** `asyncpg.connect`  

Was async def connect(dsn=None, \*, host=None, port=None, user=None, password=None, passfile=None, database=None, loop=None, timeout=60, statement_cache_size=100, max_cached_statement_lifetime=300, max_cacheable_statement_size=1024 \* 15... [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.Connection.execute`  

Was async def execute(self, query: str, \*args, timeout: float = None) -> str; now async def execute(self, query: str, \*args, timeout: typing.Optional\[float\] = None) -> str. [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.Connection.executemany`  

Was async def executemany(self, command: str, args, \*, timeout: float = None); now async def executemany(self, command: str, args, \*, timeout: typing.Optional\[float\] = None). [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.Connection.fetchmany`  

Was async def fetchmany(self, query, args, \*, timeout: float = None, record_class=None); now async def fetchmany(self, query, args, \*, timeout: typing.Optional\[float\] = None, record_class=None). [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.Pool.execute`  

Was async def execute(self, query: str, \*args, timeout: float = None) -> str; now async def execute(self, query: str, \*args, timeout: Optional\[float\] = None) -> str. [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.Pool.executemany`  

Was async def executemany(self, command: str, args, \*, timeout: float = None); now async def executemany(self, command: str, args, \*, timeout: Optional\[float\] = None). [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.pool.PoolAcquireContext.__aexit__`  

Was async def \_\_aexit\_\_(self, \*exc); now async def \_\_aexit\_\_(self, exc_type: Optional\[Type\[BaseException\]\] = None, exc_val: Optional\[BaseException\] = None, exc_tb: Optional\[TracebackType\] = None) -> None. [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)
- **Signature changed** `asyncpg.prepared_stmt.PreparedStatement.executemany`  

Was async def executemany(self, args, \*, timeout: float = None); now async def executemany(self, args, \*, timeout: typing.Optional\[float\] = None). [pypi.org](https://pypi.org/project/asyncpg/0.31.0/)

And 7 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## asyncpg 0.30.0 breaking changes

asyncpg 0.30.0, released October 20, 2024: 13 breaking changes.

- **Signature changed** `asyncpg.connect`  

Was async def connect(dsn=None, \*, host=None, port=None, user=None, password=None, passfile=None, database=None, loop=None, timeout=60, statement_cache_size=100, max_cached_statement_lifetime=300, max_cacheable_statement_size=1024 \* 15... [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.create_pool`  

Was def create_pool(dsn=None, \*, min_size=10, max_size=10, max_queries=50000, max_inactive_connection_lifetime=300.0, setup=None, init=None, loop=None, connection_class=connection.Connection, record_class=protocol.Record... [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.Pool.__init__`  

Was def \_\_init\_\_(self, \*connect_args, min_size, max_size, max_queries, max_inactive_connection_lifetime, setup, init, loop, connection_class, record_class, \*\*connect_kwargs); now def \_\_init\_\_(self, \*connect_args, min_size, max_size... [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.protocol.BUILTIN_TYPE_NAME_MAP`  

Was from asyncpg.protocol.protocol import BUILTIN_TYPE_NAME_MAP; now BUILTIN_TYPE_NAME_MAP: Final\[dict\[str, int\]\]. [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.protocol.NO_TIMEOUT`  

Was from asyncpg.protocol.protocol import NO_TIMEOUT; now NO_TIMEOUT: Final\[\_NoTimeoutType\]. [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.protocol.Protocol`  

Was from asyncpg.protocol.protocol import Protocol; now class Protocol(BaseProtocol\[\_Record\], asyncio.protocols.Protocol). [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.protocol.Record`  

Was from asyncpg.protocol.protocol import Record; now class Record. [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.Record`  

Was from asyncpg.protocol import Record; now class Record. [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.serverversion.ServerVersion`  

Was ServerVersion; now class ServerVersion(typing.NamedTuple). [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)
- **Signature changed** `asyncpg.types.Attribute`  

Was Attribute; now class Attribute(typing.NamedTuple). [pypi.org](https://pypi.org/project/asyncpg/0.30.0/)

And 3 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
