Skip to content

Commit 804628d

Browse files
authored
Remove unused protocol (#8418)
1 parent b7b98a6 commit 804628d

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

stdlib/concurrent/futures/_base.pyi

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import sys
22
import threading
33
from _typeshed import Self
4-
from abc import abstractmethod
5-
from collections.abc import Callable, Container, Iterable, Iterator, Sequence
4+
from collections.abc import Callable, Iterable, Iterator, Sequence
65
from logging import Logger
76
from types import TracebackType
8-
from typing import Any, Generic, Protocol, TypeVar, overload
7+
from typing import Any, Generic, TypeVar, overload
98
from typing_extensions import Literal, ParamSpec, SupportsIndex
109

1110
if sys.version_info >= (3, 9):
@@ -33,16 +32,8 @@ if sys.version_info >= (3, 8):
3332
class BrokenExecutor(RuntimeError): ...
3433

3534
_T = TypeVar("_T")
36-
_T_co = TypeVar("_T_co", covariant=True)
3735
_P = ParamSpec("_P")
3836

39-
# Copied over Collection implementation as it does not exist in Python 2 and <3.6.
40-
# Also to solve pytype issues with _Collection.
41-
class _Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]):
42-
# Implement Sized (but don't have it as a base class).
43-
@abstractmethod
44-
def __len__(self) -> int: ...
45-
4637
class Future(Generic[_T]):
4738
def __init__(self) -> None: ...
4839
def cancel(self) -> bool: ...

0 commit comments

Comments
 (0)