]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- 'cycle' is a stack here - needs to be a list.
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 Mar 2010 17:52:57 +0000 (13:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 Mar 2010 17:52:57 +0000 (13:52 -0400)
CHANGES
lib/sqlalchemy/topological.py

diff --git a/CHANGES b/CHANGES
index cc3d9b61951729b5a32fc5108f1c59897f4ca00f..39bba20bbfa27d6bccdda37839b2b8922631e49d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,10 @@ CHANGES
     "delete-orphan", or will simply detach it otherwise.
     [ticket:1754]
 
+  - Fixed a potential issue in topological cycle detection 
+    introduced in 0.6beta3, for units of work with long 
+    dependency cycles.
+    
 - sql
   - Restored some bind-labeling logic from 0.5 which ensures
     that tables with column names that overlap another column
index d35213f6b5afc58e6243c30dc8cdb3b2a1bdf56f..9e584ff4e06fda8ab39df2adfd48226911a9e9ba 100644 (file)
@@ -270,7 +270,7 @@ def _find_cycles(edges):
         for (n, key) in edges.edges_by_parent(node):
             if key in cycle:
                 continue
-            cycle.add(key)
+            cycle.append(key)
             if key is goal:
                 cycset = set(cycle)
                 for x in cycle:
@@ -287,7 +287,7 @@ def _find_cycles(edges):
             cycle.pop()
 
     for parent in edges.get_parents():
-        traverse(parent, set(), parent)
+        traverse(parent, [], parent)
 
     unique_cycles = set(tuple(s) for s in cycles.values())