Update zoneinfo for Python3.12 (#10304)

This commit is contained in:
Nikita Sobolev
2023-06-12 12:34:03 +03:00
committed by GitHub
parent 85a6dd14e1
commit 75fc33d8d0
2 changed files with 6 additions and 4 deletions

View File

@@ -17,9 +17,9 @@ class ZoneInfo(tzinfo):
@classmethod
def no_cache(cls, key: str) -> Self: ...
@classmethod
def from_file(cls, __fobj: _IOBytes, key: str | None = ...) -> Self: ...
def from_file(cls, __fobj: _IOBytes, key: str | None = None) -> Self: ...
@classmethod
def clear_cache(cls, *, only_keys: Iterable[str] | None = ...) -> None: ...
def clear_cache(cls, *, only_keys: Iterable[str] | None = None) -> None: ...
def tzname(self, __dt: datetime | None) -> str | None: ...
def utcoffset(self, __dt: datetime | None) -> timedelta | None: ...
def dst(self, __dt: datetime | None) -> timedelta | None: ...
@@ -30,7 +30,7 @@ class ZoneInfo(tzinfo):
def reset_tzpath(to: Sequence[StrPath] | None = None) -> None: ...
def available_timezones() -> set[str]: ...
TZPATH: Sequence[str]
TZPATH: tuple[str, ...]
class ZoneInfoNotFoundError(KeyError): ...
class InvalidTZPathWarning(RuntimeWarning): ...

View File

@@ -188,7 +188,6 @@ zipfile.Path.is_symlink
zipfile.Path.match
zipfile.Path.relative_to
zipfile.Path.rglob
zoneinfo.ZoneInfo.from_file
# Errors that also existed on Python 3.11
_collections_abc.AsyncGenerator.ag_await
@@ -259,6 +258,9 @@ posixpath.join
ntpath.join
os.path.join
# Pos-only parameters had different "names" in different Python versions:
zoneinfo.ZoneInfo.from_file
# ==========
# Allowlist entries that cannot or should not be fixed
# ==========