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

@@ -11,6 +11,7 @@ from typing_extensions import Literal, Self, TypeAlias
__all__ = [
"BadZipFile",
"BadZipfile",
"Path",
"error",
"ZIP_STORED",
"ZIP_DEFLATED",
@@ -23,9 +24,6 @@ __all__ = [
"LargeZipFile",
]
if sys.version_info >= (3, 8):
__all__ += ["Path"]
# TODO: use TypeAlias when mypy bugs are fixed
# https://github.com/python/mypy/issues/16581
_DateTuple = tuple[int, int, int, int, int, int] # noqa: Y026
@@ -132,7 +130,7 @@ class ZipFile:
strict_timestamps: bool = True,
metadata_encoding: None = None,
) -> None: ...
elif sys.version_info >= (3, 8):
else:
def __init__(
self,
file: StrPath | IO[bytes],
@@ -143,15 +141,6 @@ class ZipFile:
*,
strict_timestamps: bool = True,
) -> None: ...
else:
def __init__(
self,
file: StrPath | IO[bytes],
mode: _ZipFileMode = "r",
compression: int = 0,
allowZip64: bool = True,
compresslevel: int | None = None,
) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(
@@ -217,20 +206,15 @@ class ZipInfo:
file_size: int
orig_filename: str # undocumented
def __init__(self, filename: str = "NoName", date_time: _DateTuple = (1980, 1, 1, 0, 0, 0)) -> None: ...
if sys.version_info >= (3, 8):
@classmethod
def from_file(cls, filename: StrPath, arcname: StrPath | None = None, *, strict_timestamps: bool = True) -> Self: ...
else:
@classmethod
def from_file(cls, filename: StrPath, arcname: StrPath | None = None) -> Self: ...
@classmethod
def from_file(cls, filename: StrPath, arcname: StrPath | None = None, *, strict_timestamps: bool = True) -> Self: ...
def is_dir(self) -> bool: ...
def FileHeader(self, zip64: bool | None = None) -> bytes: ...
if sys.version_info >= (3, 12):
from zipfile._path import CompleteDirs as CompleteDirs, Path as Path
elif sys.version_info >= (3, 8):
else:
class CompleteDirs(ZipFile):
def resolve_dir(self, name: str) -> str: ...
@overload