]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Ensure proxy transaction still present on exit before closing
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Apr 2021 16:53:22 +0000 (12:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 17 Apr 2021 16:54:58 +0000 (12:54 -0400)
commit7ed092df5c4a16990942333a8a43743d02ce18ff
tree1625716d7dd68c80fd019eaadfc187b1c0054a8c
parentdd9c4d695c4463c872b25f59b6a8742bbc047150
Ensure proxy transaction still present on exit before closing

Fixed regression caused by the SQLAlchemy 1.4/2.0 compatibility switch
where calling ``.rollback()`` or ``.commit()`` explicitly within the
``context.begin_transaction()`` context manager would cause it to fail when
the block ended, as it did not expect that the transaction was manually
closed.

Change-Id: I4c5ba368bfd480d186276cd75edaac5019130bc6
Fixes: #829
alembic/runtime/migration.py
docs/build/unreleased/829.rst [new file with mode: 0644]
tests/test_environment.py