From: Jakub Stasiak Date: Wed, 4 Jun 2014 08:56:13 +0000 (+0100) Subject: Remove RootTransaction<->RootTransaction reference cycle X-Git-Tag: rel_1_0_7~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18a078654da286c0adf51a20a21398e357ed12ed;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Remove RootTransaction<->RootTransaction reference cycle (cherry picked from commit 3ef00e816da042d4932be53b86f76db17c800842) --- diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index c5eabac0d6..eaa435d45d 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -1531,9 +1531,13 @@ class Transaction(object): def __init__(self, connection, parent): self.connection = connection - self._parent = parent or self + self._actual_parent = parent self.is_active = True + @property + def _parent(self): + return self._actual_parent or self + def close(self): """Close this :class:`.Transaction`.