diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2019-12-31 01:09:37 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2019-12-31 01:09:37 +0000 |
| commit | 431f655b407cd3b266b5dfed5a5f3822e2c6b032 (patch) | |
| tree | 8accba3710b0497375c854f0864d1c536bf9cbc4 /lib/sqlalchemy/sql/elements.py | |
| parent | d030cfed6a87e1cccd80ef1ef500cd4cb2c1f766 (diff) | |
| parent | 04fbb9e63c098dd2de40b545eed210dfd93893ce (diff) | |
| download | sqlalchemy-431f655b407cd3b266b5dfed5a5f3822e2c6b032.tar.gz | |
Merge "Test for short term reference cycles and resolve as many as possible"
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
| -rw-r--r-- | lib/sqlalchemy/sql/elements.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 7d857d4fe..c16c2f0ca 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -255,6 +255,12 @@ class ClauseElement( """ s = util.column_set() f = self + + # note this creates a cycle, asserted in test_memusage. however, + # turning this into a plain @property adds tends of thousands of method + # calls to Core / ORM performance tests, so the small overhead + # introduced by the relatively small amount of short term cycles + # produced here is preferable while f is not None: s.add(f) f = f._is_clone_of |
