From 2168a64affb2e299b9a37079af7b2a8d4ae0ff64 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 6 Apr 2022 09:41:11 -0400 Subject: maintain complete cloned_set for BindParameter Fixed regression caused by :ticket:`7823` which impacted the caching system, such that bound parameters that had been "cloned" within ORM operations, such as polymorphic loading, would in some cases not acquire their correct execution-time value leading to incorrect bind values being rendered. Fixes: #7903 Change-Id: I61c802749b859bebeb127d24e66d6e77d13ce57a --- lib/sqlalchemy/testing/fixtures.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/sqlalchemy/testing') diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 8c0120bcc..b4b9cab5f 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -51,6 +51,13 @@ class TestBase: def assert_(self, val, msg=None): assert val, msg + @config.fixture() + def nocache(self): + _cache = config.db._compiled_cache + config.db._compiled_cache = None + yield + config.db._compiled_cache = _cache + @config.fixture() def connection_no_trans(self): eng = getattr(self, "bind", None) or config.db -- cgit v1.2.1