Prechádzať zdrojové kódy

Builtin apply() is deprecated, avoid using it.

Branko Čibej 14 rokov pred
rodič
commit
5b98ad75ee
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      celery/result.py

+ 2 - 1
celery/result.py

@@ -447,7 +447,8 @@ class EagerResult(BaseAsyncResult):
                                  self._state, self._traceback))
 
     def __copy__(self):
-        return apply(*self.__reduce__())
+        cls, attrs = self.__reduce__()
+        return cls(*attrs)
 
     def successful(self):
         """Returns :const:`True` if the task executed without failure."""