diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-01 16:36:51 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-01 16:37:31 -0400 |
commit | c4abf5a44249fa42ae9c5d5c3035b8258c6d92b6 (patch) | |
tree | 1b5e16b85b505ce983706b5d8847c79b7b91ff35 /lib/sqlalchemy/dialects/postgresql/asyncpg.py | |
parent | a99ea884403de1e1f762e9b1eb635d7fc6ef8e6f (diff) | |
download | sqlalchemy-c4abf5a44249fa42ae9c5d5c3035b8258c6d92b6.tar.gz |
use full context manager flow for future.Engine.begin()
Fixed issue in future :class:`_future.Engine` where calling upon
:meth:`_future.Engine.begin` and entering the context manager would not
close the connection if the actual BEGIN operation failed for some reason,
such as an event handler raising an exception; this use case failed to be
tested for the future version of the engine. Note that the "future" context
managers which handle ``begin()`` blocks in Core and ORM don't actually run
the "BEGIN" operation until the context managers are actually entered. This
is different from the legacy version which runs the "BEGIN" operation up
front.
Fixes: #7272
Change-Id: I9667ac0861a9e007c4b3dfcf0fcf0829038a8711
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py')
0 files changed, 0 insertions, 0 deletions