From 852119c9f8235a75dcfa9339e6ebf2f57eb39154 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 25 Feb 2021 17:07:06 -0500 Subject: Revert AppenderQuery modifications from ORM We are unfortunately stuck with this class completely until we get rid of "dynamic" altogether. The usage contract includes the "query_class" mixin feature where users add their own methods, and this use case very well in line with 2.0's contract. As Query is not going away in any case this has to stay in "legacy" style, there's no point trying to change it as the new version was still fully dependent on Query. Fixes: #5981 Change-Id: I1bc623b17d976b4bb417ab623248d4ac227db74d --- lib/sqlalchemy/testing/assertions.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/sqlalchemy/testing') diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py index 44d7405b1..81c74e7c1 100644 --- a/lib/sqlalchemy/testing/assertions.py +++ b/lib/sqlalchemy/testing/assertions.py @@ -444,9 +444,6 @@ class AssertsCompiledSQL(object): from sqlalchemy import orm - if isinstance(clause, orm.dynamic.AppenderQuery): - clause = clause._statement - if isinstance(clause, orm.Query): compile_state = clause._compile_state() compile_state.statement._label_style = ( -- cgit v1.2.1