]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- A rare case which occurs when a :meth:`.Session.rollback` fails in the
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 19 Nov 2015 20:45:17 +0000 (15:45 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 19 Nov 2015 20:45:17 +0000 (15:45 -0500)
commita6fe4dc0c8ebc346a90dd849a86dac9345d74515
treee3411c2a3ede5e942d3a5ea65c635dfe7cd2e745
parent1dc805dd4d902b9204703f0bd6151c58f1f287af
- A rare case which occurs when a :meth:`.Session.rollback` fails in the
scope of a :meth:`.Session.flush` operation that's raising an
exception, as has been observed in some MySQL SAVEPOINT cases, prevents
the original  database exception from being observed when it was
emitted during  flush, but only on Py2K because Py2K does not support
exception  chaining; on Py3K the originating exception is chained.  As
a workaround, a warning is emitted in this specific case showing at
least the string message of the original database error before we
proceed to raise  the rollback-originating exception.
fixes #2696
doc/build/changelog/changelog_10.rst
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/testing/assertions.py
test/orm/test_transaction.py