]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
catch OSError (base of ConnectionError) and asyncpg errors for terminate
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 11 Jan 2024 03:31:59 +0000 (22:31 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 11 Jan 2024 03:33:49 +0000 (22:33 -0500)
commite525704800bbc483b4ca22997157d75bc90b9a41
treee396ffc90272b043ba67fab6a18f80ac56b6d11e
parent29ffe2ca2af2ee5390c2f195f2c5de0e73a769a2
catch OSError (base of ConnectionError) and asyncpg errors for terminate

Fixed regression in the asyncpg dialect caused by :ticket:`10717` in
release 2.0.24 where the change that now attempts to gracefully close the
asyncpg connection before terminating would not fall back to
``terminate()`` for other potential connection-related exceptions other
than a timeout error, not taking into account cases where the graceful
``.close()`` attempt fails for other reasons such as connection errors.

Fixes: #10863
Change-Id: If1791bce26803f92547cdf26fb641996c7f638fa
(cherry picked from commit eff3aa8ad6bf74181280a85bf03d401126c65b01)
doc/build/changelog/unreleased_20/10863.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py