import abc
from collections.abc import Callable
from datetime import datetime, timedelta, tzinfo
from typing import ClassVar, TypeVar
from typing_extensions import ParamSpec

ZERO: timedelta

__all__ = ["tzname_in_python2", "enfold"]

_P = ParamSpec("_P")
_R = TypeVar("_R")
_DateTimeT = TypeVar("_DateTimeT", bound=datetime)

def tzname_in_python2(namefunc: Callable[_P, _R]) -> Callable[_P, _R]: ...
def enfold(dt: _DateTimeT, fold: int = 1) -> _DateTimeT: ...

# Doesn't actually have ABCMeta as the metaclass at runtime,
# but mypy complains if we don't have it in the stub.
# See discussion in #8908
class _tzinfo(tzinfo, metaclass=abc.ABCMeta):
    def is_ambiguous(self, dt: datetime) -> bool: ...
    def fromutc(self, dt: datetime) -> datetime: ...

class tzrangebase(_tzinfo):
    def __init__(self) -> None: ...
    def utcoffset(self, dt: datetime | None) -> timedelta | None: ...
    def dst(self, dt: datetime | None) -> timedelta | None: ...
    def tzname(self, dt: datetime | None) -> str: ...
    def fromutc(self, dt: datetime) -> datetime: ...
    def is_ambiguous(self, dt: datetime) -> bool: ...
    __hash__: ClassVar[None]  # type: ignore[assignment]
    def __ne__(self, other: object) -> bool: ...
    __reduce__ = object.__reduce__
