From fa5522547150687c9b3cd41d28df08ab0512b5b2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 28 Aug 2014 17:57:48 -0400 Subject: - Made a small adjustment to the mechanics of lazy loading, such that it has less chance of interfering with a joinload() in the very rare circumstance that an object points to itself; in this scenario, the object refers to itself while loading its attributes which can cause a mixup between loaders. The use case of "object points to itself" is not fully supported, but the fix also removes some overhead so for now is part of testing. fixes #3145 --- lib/sqlalchemy/testing/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/testing/util.py') diff --git a/lib/sqlalchemy/testing/util.py b/lib/sqlalchemy/testing/util.py index fc8390a79..7b3f721a6 100644 --- a/lib/sqlalchemy/testing/util.py +++ b/lib/sqlalchemy/testing/util.py @@ -203,5 +203,7 @@ class adict(dict): except KeyError: return dict.__getattribute__(self, key) - def get_all(self, *keys): + def __call__(self, *keys): return tuple([self[key] for key in keys]) + + get_all = __call__ -- cgit v1.2.1