Преглед изворни кода

Implement Signature.__deepcopy__. (Issue #1078)

Ask Solem пре 12 година
родитељ
комит
e6a7b60ebe
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      celery/canvas.py

+ 4 - 0
celery/canvas.py

@@ -185,6 +185,10 @@ class Signature(dict):
             return chain(self, other)
         return NotImplemented
 
+    def __deepcopy__(self, memo):
+        memo[id(self)] = self
+        return dict(self)
+
     def __invert__(self):
         return self.apply_async().get()