]> 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:47:41 +0000 (08:47 -0500)
commit80b52dc522f9f03a86ca6c3a5766cd9c594804ec
tree5b6d9bd9250945d3fc810c3071090e58ebb98085
parent62b3ca476e879bacb20bb0c520c7c91feca576c0
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
doc/build/changelog/unreleased_20/11005.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/asyncpg.py
test/dialect/postgresql/test_dialect.py