Skip to content

Commit

Permalink
group cannot override dict.__iter__: now returns list of keys, not li…
Browse files Browse the repository at this point in the history
…st of tasks. Closes celery#3688
  • Loading branch information
ask committed Dec 15, 2016
1 parent 199cf69 commit 8c7ac5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions celery/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,9 +1123,6 @@ def _freeze_unroll(self, new_tasks, group_id, chord, root_id, parent_id):
chord=chord, root_id=root_id,
parent_id=parent_id)

def __iter__(self):
return iter(self.tasks)

def __repr__(self):
if self.tasks:
return remove_repeating_from_task(
Expand Down
2 changes: 1 addition & 1 deletion t/unit/tasks/test_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def test_skew(self):

def test_iter(self):
g = group([self.add.s(i, i) for i in range(10)])
assert list(iter(g)) == g.tasks
assert list(iter(g)) == list(g.keys())

@staticmethod
def helper_test_get_delay(result):
Expand Down

0 comments on commit 8c7ac5d

Please sign in to comment.