diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-21 15:37:20 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-21 18:39:31 -0400 |
commit | 7827dfb6726a682c630d66b24423582d5dc09589 (patch) | |
tree | 924c2abdb48154bbc36f09c9c4575a69873414e4 /test/dialect/postgresql/test_compiler.py | |
parent | 930b07c3af5300e65473d44535db8c1d7133cb13 (diff) | |
download | sqlalchemy-7827dfb6726a682c630d66b24423582d5dc09589.tar.gz |
Handle BaseException in all _handle_dbapi_error
Tests illustrate that exceptions like GreenletExit and
even KeyboardInterrupt can corrupt the state of a DBAPI
connection like that of pymysql and mysqlclient. Intercept
BaseException errors within the handle_error scheme and
invalidate just the connection alone in this case, but not
the whole pool.
The change is backwards-incompatible with a program that
currently intercepts ctrl-C within a database transaction
and wants to continue working on that transaction. Ensure
the event hook can be used to reverse this behavior.
Change-Id: Ifaa013c13826d123eef34e32b7e79fff74f1b21b
Fixes: #3803
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
0 files changed, 0 insertions, 0 deletions