diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-19 01:18:06 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-19 01:19:32 -0400 |
| commit | e67d1b79c544c14f375dff90b5d8af5b472c053e (patch) | |
| tree | 177d6959aaf1560e8a4cadc81fe8117c5ee27636 /lib/sqlalchemy/testing | |
| parent | d0812a1abf903f6b5f1a0bfb19f8c87a665f8309 (diff) | |
| download | sqlalchemy-e67d1b79c544c14f375dff90b5d8af5b472c053e.tar.gz | |
Deannoate functions before matching .__class__
Fixed regression where the SQL compilation of a :class:`.Function` would
not work correctly if the object had been "annotated", which is an internal
memoization process used mostly by the ORM. In particular it could affect
ORM lazy loads which make greater use of this feature in 1.4.
Fixes: #6095
Change-Id: I7a6527df651f440a04d911ba78ee0b0dd4436dcd
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 95dce02a9..f47277b4a 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -72,6 +72,12 @@ class TestBase(object): conn.close() @config.fixture() + def registry(self, metadata): + reg = registry(metadata=metadata) + yield reg + reg.dispose() + + @config.fixture() def future_connection(self, future_engine, connection): # integrate the future_engine and connection fixtures so # that users of the "connection" fixture will get at the |
