diff options
author | Jakub Stasiak <jakub@stasiak.at> | 2014-06-04 09:56:13 +0100 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-07-18 10:45:09 -0400 |
commit | 18a078654da286c0adf51a20a21398e357ed12ed (patch) | |
tree | d3b369b3948325893e1f605efa33bbad81309723 | |
parent | c8f38dff1143585226cd79865a6144d16ee0ba18 (diff) | |
download | sqlalchemy-18a078654da286c0adf51a20a21398e357ed12ed.tar.gz |
Remove RootTransaction<->RootTransaction reference cycle
(cherry picked from commit 3ef00e816da042d4932be53b86f76db17c800842)
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index c5eabac0d..eaa435d45 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`. |