]> 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:50:59 +0000 (21:50 -0400)
commitf601791a914d3181252493800871c458ad6c46d1
tree0833fca5a9b8e05ea6faf70d5a01ee1046190279
parent3abced7bd2842d41e17f438a65efc15aa71d4bb4
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
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