From ebb72c3645fa7d868e641f50777583fb997002aa Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 12 May 2021 15:23:43 +0100 Subject: [PATCH] remove pointless TaskInfo.__reduce__ you cannot pickle a coroutine --- src/anyio/_core/_testing.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/anyio/_core/_testing.py b/src/anyio/_core/_testing.py index 941232a4..06b4d9c2 100644 --- a/src/anyio/_core/_testing.py +++ b/src/anyio/_core/_testing.py @@ -1,4 +1,4 @@ -from typing import Coroutine, Generator, Optional, Tuple, Type +from typing import Coroutine, Generator, Optional from ._compat import DeprecatedAwaitableList, _warn_deprecation from ._eventloop import get_asynclib @@ -43,11 +43,6 @@ def __await__(self) -> Generator[None, None, "TaskInfo"]: yield return self - def __reduce__(self) -> Tuple[ - Type["TaskInfo"], Tuple[int, Optional[int], Optional[str], Coroutine] - ]: - return TaskInfo, (self.id, self.parent_id, self.name, self.coro) - def _unwrap(self) -> 'TaskInfo': return self