Selaa lähdekoodia

Implement Signature.__deepcopy__. (Issue #1078)

Ask Solem 12 vuotta sitten
vanhempi
commit
e6a7b60ebe
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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()