]> 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:13:00 +0000 (13:13 -0500)
commitc5f03549377f161720294386b04cf2f7b62e868d
tree6a85262138e55f22c71ec6dbbf7a26d11f29458b
parent0c6ab45e49252167ac139c5836f0bd02b5b06b6e
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
(cherry picked from commit 299cdf667d5af96c5db75a923d2fd15eef2dfe26)
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