]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Repair uncovered warning in persistnce.py; update versioning tests
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 31 Dec 2019 16:53:07 +0000 (11:53 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 31 Dec 2019 21:13:22 +0000 (16:13 -0500)
commit51a19f12a1e93f572d3e0c8c5a4cee07fe5c4bf8
tree18c2386ce1ae6bcd3198d3f970314271b1dda919
parentdc41540c8d4bdedbfb0882a7bc584e25c4225f59
Repair uncovered warning in persistnce.py; update versioning tests

Repaired a warning in the ORM flush process that was not covered by  test
coverage when deleting objects that use the "version_id" feature. This
warning is generally unreachable unless using a dialect that sets the
"supports_sane_rowcount" flag to False, which  is not typically the case
however is possible for some MySQL configurations as well as older Firebird
drivers, and likely some third party dialects.

As part of this change, we would like to establish that versionining-
related warnings are not expected to emit for the core set of
test-covered dialects, and if they are we would like the check for
warning emitted to be explicit, rather than an ignore.

Fixes: #5068
Change-Id: Iee097554e43cbb54ced1be056635809e67cf30d6
(cherry picked from commit 7210595a79cd33b3b0da48db2806856fe018f495)
doc/build/changelog/unreleased_13/5068.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/orm/persistence.py
test/orm/test_versioning.py