mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user