]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
set default iso to None for asyncpg pep-249 wrapper
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 16 Jan 2025 17:14:02 +0000 (12:14 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Jan 2025 18:12:19 +0000 (13:12 -0500)
commit299cdf667d5af96c5db75a923d2fd15eef2dfe26
tree1f67685bfe6049eb6791ccf2189bce53a147cc8e
parent214088c42ad61794e315174c41ee92a3c408ae6c
set default iso to None for asyncpg pep-249 wrapper

Adjusted the asyncpg connection wrapper so that the asyncpg
``.transaction()`` call sends ``None`` for isolation_level if not otherwise
set in the SQLAlchemy dialect/wrapper, thereby allowing asyncpg to make use
of the server level setting for isolation_level in the absense of a
client-level setting. Previously, this behavior of asyncpg was blocked by a
hardcoded ``read_committed``.

Fixes: #12159
Change-Id: I2cd878a5059a8fefc9557a9b8e056fedaee2e9a4
doc/build/changelog/unreleased_20/12159.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
test/dialect/postgresql/test_async_pg_py3k.py