Explorar o código

Removes usage of deprecated apply built-in

Ask Solem %!s(int64=14) %!d(string=hai) anos
pai
achega
2e62b25cc9
Modificáronse 2 ficheiros con 2 adicións e 4 borrados
  1. 2 1
      celery/result.py
  2. 0 3
      docs/userguide/tasks.rst

+ 2 - 1
celery/result.py

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

+ 0 - 3
docs/userguide/tasks.rst

@@ -49,9 +49,6 @@ attributes:
 
 :id: The unique id of the executing task.
 
-:taskset: The unique id of the taskset that owns the executing task.
-          This key exists only if the task is a member of a taskset.
-
 :args: Positional arguments.
 
 :kwargs: Keyword arguments.