mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 22:31:12 +08:00
Update zoneinfo for Python3.12 (#10304)
This commit is contained in:
@@ -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): ...
|
||||
|
||||
@@ -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
|
||||
# ==========
|
||||
|
||||
Reference in New Issue
Block a user