Remove Python 3.7 branches (#11238)

This commit is contained in:
Sebastian Rittau
2024-01-05 11:39:39 +01:00
committed by GitHub
parent 4e62577002
commit 23604858a6
122 changed files with 1952 additions and 3800 deletions

View File

@@ -13,18 +13,9 @@ _S = TypeVar("_S")
_T = TypeVar("_T")
class ApplyResult(Generic[_T]):
if sys.version_info >= (3, 8):
def __init__(
self, pool: Pool, callback: Callable[[_T], object] | None, error_callback: Callable[[BaseException], object] | None
) -> None: ...
else:
def __init__(
self,
cache: dict[int, ApplyResult[Any]],
callback: Callable[[_T], object] | None,
error_callback: Callable[[BaseException], object] | None,
) -> None: ...
def __init__(
self, pool: Pool, callback: Callable[[_T], object] | None, error_callback: Callable[[BaseException], object] | None
) -> None: ...
def get(self, timeout: float | None = None) -> _T: ...
def wait(self, timeout: float | None = None) -> None: ...
def ready(self) -> bool: ...
@@ -36,31 +27,17 @@ class ApplyResult(Generic[_T]):
AsyncResult = ApplyResult
class MapResult(ApplyResult[list[_T]]):
if sys.version_info >= (3, 8):
def __init__(
self,
pool: Pool,
chunksize: int,
length: int,
callback: Callable[[list[_T]], object] | None,
error_callback: Callable[[BaseException], object] | None,
) -> None: ...
else:
def __init__(
self,
cache: dict[int, ApplyResult[Any]],
chunksize: int,
length: int,
callback: Callable[[list[_T]], object] | None,
error_callback: Callable[[BaseException], object] | None,
) -> None: ...
def __init__(
self,
pool: Pool,
chunksize: int,
length: int,
callback: Callable[[list[_T]], object] | None,
error_callback: Callable[[BaseException], object] | None,
) -> None: ...
class IMapIterator(Iterator[_T]):
if sys.version_info >= (3, 8):
def __init__(self, pool: Pool) -> None: ...
else:
def __init__(self, cache: dict[int, IMapIterator[Any]]) -> None: ...
def __init__(self, pool: Pool) -> None: ...
def __iter__(self) -> Self: ...
def next(self, timeout: float | None = None) -> _T: ...
def __next__(self, timeout: float | None = None) -> _T: ...
@@ -120,12 +97,7 @@ class ThreadPool(Pool):
) -> None: ...
# undocumented
if sys.version_info >= (3, 8):
INIT: Literal["INIT"]
RUN: Literal["RUN"]
CLOSE: Literal["CLOSE"]
TERMINATE: Literal["TERMINATE"]
else:
RUN: Literal[0]
CLOSE: Literal[1]
TERMINATE: Literal[2]
INIT: Literal["INIT"]
RUN: Literal["RUN"]
CLOSE: Literal["CLOSE"]
TERMINATE: Literal["TERMINATE"]