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

@@ -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(

View File

@@ -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,

View File

@@ -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),
],
)