mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +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:
@@ -2,7 +2,6 @@ from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
import pytest
|
||||
from pytest_mock import MockerFixture
|
||||
@@ -23,7 +22,7 @@ autooff = parametrize(
|
||||
[
|
||||
("auto_off_enabled", "enabled", bool),
|
||||
("auto_off_minutes", "delay", int),
|
||||
("auto_off_at", "auto_off_at", Optional[datetime]),
|
||||
("auto_off_at", "auto_off_at", datetime | None),
|
||||
],
|
||||
)
|
||||
@pytest.mark.skipif(
|
||||
|
@@ -74,7 +74,7 @@ async def test_update_available_without_cloud(dev: SmartDevice):
|
||||
pytest.param(False, pytest.raises(KasaException), id="not-available"),
|
||||
],
|
||||
)
|
||||
@pytest.mark.requires_dummy()
|
||||
@pytest.mark.requires_dummy
|
||||
async def test_firmware_update(
|
||||
dev: SmartDevice,
|
||||
mocker: MockerFixture,
|
||||
|
@@ -17,8 +17,7 @@ waterleak = parametrize(
|
||||
("feature", "prop_name", "type"),
|
||||
[
|
||||
("water_alert", "alert", int),
|
||||
# Can be converted to 'datetime | None' after py3.9 support is dropped
|
||||
("water_alert_timestamp", "alert_timestamp", (datetime, type(None))),
|
||||
("water_alert_timestamp", "alert_timestamp", datetime | None),
|
||||
("water_leak", "status", Enum),
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user