diff options
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/topological.py | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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 diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py index d35213f6b..9e584ff4e 100644 --- a/lib/sqlalchemy/topological.py +++ b/lib/sqlalchemy/topological.py @@ -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()) |
