Remove support for python <3.11 (#1273)

Python 3.11 ships with latest Debian Bookworm. 
pypy is not that widely used with this library based on statistics. It could be added back when pypy supports python 3.11.
This commit is contained in:
Steven B.
2024-11-18 18:46:36 +00:00
committed by GitHub
parent 0c40939624
commit a01247d48f
55 changed files with 176 additions and 620 deletions

View File

@@ -6,7 +6,7 @@ import base64
import logging
import time
from collections.abc import Mapping, Sequence
from datetime import datetime, timedelta, timezone, tzinfo
from datetime import UTC, datetime, timedelta, tzinfo
from typing import TYPE_CHECKING, Any, cast
from ..device import Device, WifiNetwork, _DeviceInfo
@@ -520,7 +520,7 @@ class SmartDevice(Device):
return time_mod.time
# We have no device time, use current local time.
return datetime.now(timezone.utc).astimezone().replace(microsecond=0)
return datetime.now(UTC).astimezone().replace(microsecond=0)
@property
def on_since(self) -> datetime | None: