Simon Law  committed 3633831

Minor cleanups

  • Participants
  • Parent commits 30b5b2f

Comments (0)

Files changed (1)

File south/migration/

+from collections import deque
 import datetime
 import os
 import re
     def add_dependent(self, migration):
         if not hasattr(self, '_dependents'):
-            self._dependents = []
+            self._dependents = deque()
         if migration and migration not in self._dependents:
-            self._dependents.insert(0, migration)
+            self._dependents.appendleft(migration)
     def dependents(self):
     def backwards(self):
         return self.migration_instance().backwards
     def _forwards_plan(self):
         result = SortedDict()
         # We need to apply all the migrations this one depends on
         This list includes `self`, which will be applied last.
-        return list(self._forwards_plan().iterkeys())
+        return list(self._forwards_plan())
     def _backwards_plan(self):
         result = SortedDict()
         This list includes `self`, which will be unapplied last.
-        return list(self._backwards_plan().iterkeys())
+        return list(self._backwards_plan())
     def is_before(self, other):
         if self.migrations == other.migrations: