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

@@ -24,16 +24,12 @@ from _csv import (
if sys.version_info >= (3, 12):
from _csv import QUOTE_NOTNULL as QUOTE_NOTNULL, QUOTE_STRINGS as QUOTE_STRINGS
from _typeshed import SupportsWrite
from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Literal, Self
if sys.version_info >= (3, 8):
from builtins import dict as _DictReadMapping
else:
from collections import OrderedDict as _DictReadMapping
if sys.version_info >= (3, 12):
from types import GenericAlias
@@ -69,7 +65,7 @@ class excel(Dialect): ...
class excel_tab(excel): ...
class unix_dialect(Dialect): ...
class DictReader(Iterator[_DictReadMapping[_T | Any, str | Any]], Generic[_T]):
class DictReader(Iterator[dict[_T | Any, str | Any]], Generic[_T]):
fieldnames: Sequence[_T] | None
restkey: _T | None
restval: str | Any | None
@@ -113,7 +109,7 @@ class DictReader(Iterator[_DictReadMapping[_T | Any, str | Any]], Generic[_T]):
strict: bool = False,
) -> None: ...
def __iter__(self) -> Self: ...
def __next__(self) -> _DictReadMapping[_T | Any, str | Any]: ...
def __next__(self) -> dict[_T | Any, str | Any]: ...
if sys.version_info >= (3, 12):
def __class_getitem__(cls, item: Any) -> GenericAlias: ...
@@ -139,11 +135,7 @@ class DictWriter(Generic[_T]):
quoting: _QuotingType = 0,
strict: bool = False,
) -> None: ...
if sys.version_info >= (3, 8):
def writeheader(self) -> Any: ...
else:
def writeheader(self) -> None: ...
def writeheader(self) -> Any: ...
def writerow(self, rowdict: Mapping[_T, Any]) -> Any: ...
def writerows(self, rowdicts: Iterable[Mapping[_T, Any]]) -> None: ...
if sys.version_info >= (3, 12):