]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
cleanup
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 8 Jun 2013 23:07:52 +0000 (19:07 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 8 Jun 2013 23:07:52 +0000 (19:07 -0400)
lib/sqlalchemy/sql/util.py
lib/sqlalchemy/sql/visitors.py

index bf3f3397e5a9580106f310a2f10a1589ffbf18b8..c894357b580bc5ac4874776f71173514b4af8167 100644 (file)
@@ -812,11 +812,8 @@ class ClauseAdapter(visitors.ReplacingCloningVisitor):
     def __init__(self, selectable, equivalents=None,
                         include=None, exclude=None,
                         include_fn=None, exclude_fn=None,
-                        adapt_on_names=False,
-                        traverse_options=None):
+                        adapt_on_names=False):
         self.__traverse_options__ = {'stop_on': [selectable]}
-        if traverse_options:
-            self.__traverse_options__.update(traverse_options)
         self.selectable = selectable
         if include:
             assert not include_fn
index c5a45ffd4a79cd330ccd2f19067edf2cf8813bc1..24ada8d9f2368ff86d48da32039d726da1946092 100644 (file)
@@ -256,12 +256,8 @@ def cloned_traverse(obj, opts, visitors):
     """clone the given expression structure, allowing
     modifications by visitors."""
 
-
-    if "cloned" in opts:
-        cloned = opts['cloned']
-    else:
-        cloned = util.column_dict()
-    stop_on = util.column_set(opts.get('stop_on', []))
+    cloned = {}
+    stop_on = set(opts.get('stop_on', []))
 
     def clone(elem):
         if elem in stop_on:
@@ -284,14 +280,12 @@ def replacement_traverse(obj, opts, replace):
     """clone the given expression structure, allowing element
     replacement by a given replacement function."""
 
-    cloned = util.column_dict()
-    stop_on = util.column_set([id(x) for x in opts.get('stop_on', [])])
-    unconditional = opts.get('unconditional', False)
+    cloned = {}
+    stop_on = set([id(x) for x in opts.get('stop_on', [])])
 
     def clone(elem, **kw):
         if id(elem) in stop_on or \
-            (not unconditional
-                    and 'no_replacement_traverse' in elem._annotations):
+            'no_replacement_traverse' in elem._annotations:
             return elem
         else:
             newelem = replace(elem)