From 7210595a79cd33b3b0da48db2806856fe018f495 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 31 Dec 2019 11:53:07 -0500 Subject: 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 --- lib/sqlalchemy/engine/default.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 7016adcf4..bfc6dfee8 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -271,6 +271,13 @@ class DefaultDialect(interfaces.Dialect): @property def supports_sane_rowcount_returning(self): + """True if this dialect supports sane rowcount even if RETURNING is + in use. + + For dialects that don't support RETURNING, this is synomous + with supports_sane_rowcount. + + """ return self.supports_sane_rowcount @classmethod -- cgit v1.2.1