]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Move initialize do_rollback() outside of the dialect
authorMatthew Wilkes <git@matthewwilkes.name>
Thu, 9 May 2019 22:04:35 +0000 (18:04 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 10 May 2019 01:51:41 +0000 (21:51 -0400)
commit9a4e675e055313f2f76fdbf59e1836a158694621
tree0d4e337d81aa35684296ab827a4990c8f8571c8e
parent0f5bacc9bcc46d229e7e5fe66914656cb5ed522e
Move initialize do_rollback() outside of the dialect

Moved the "rollback" which occurs during dialect initialization so that it
occurs after additional dialect-specific initialize steps, in particular
those of the psycopg2 dialect which would inadvertently leave transactional
state on the first new connection, which could interfere with some
psycopg2-specific APIs which require that no transaction is started.  Pull
request courtesy Matthew Wilkes.

Fixes: #4663
Closes: #4664
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4664
Pull-request-sha: e544fe671d443ed06b210ba1cd1d7ba9c5653831

Change-Id: If40a15a1679b4eec0b8b8222f678697728009c30
(cherry picked from commit f601791a914d3181252493800871c458ad6c46d1)
doc/build/changelog/unreleased_13/4663.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/strategies.py
test/dialect/postgresql/test_dialect.py
test/engine/test_execute.py