]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use correct exception for terminate catch + test
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Feb 2024 13:45:53 +0000 (08:45 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Feb 2024 13:49:12 +0000 (08:49 -0500)
commitc1e192b28513e2b736f8806069d1eb4bcf4a4420
tree4c95bb9ca7474ee5ef9e896f541dca12f502ce38
parentfc415193e03b92946f396afb49ebe4e63e5c7079
use correct exception for terminate catch + test

Fixed regression caused by just-released fix for :ticket:`10863` where an
invalid exception class were added to the "except" block, which does not
get exercised unless such a catch actually happens.   A mock-style test has
been added to ensure this catch is exercised in unit tests.

Fixes: #11005
Change-Id: I5a65403fb7bb35296ff44ae3cf6a336f8e0bda97
(cherry picked from commit 80b52dc522f9f03a86ca6c3a5766cd9c594804ec)
doc/build/changelog/unreleased_20/11005.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
test/dialect/postgresql/test_dialect.py