Add python 3.14 to supported versions (#1599)

* Add python 3.14 to our supported versions and to our CI
* Convert to use pyproject.toml standard dependency groups
* Fix any issues reported by CI

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Teemu R.
2026-07-07 20:42:09 +02:00
committed by GitHub
parent 531be8437a
commit d492dd4a44
11 changed files with 1488 additions and 895 deletions

View File

@@ -96,7 +96,7 @@ def json_formatter_cb(result: Any, **kwargs) -> None:
async def invoke_subcommand(
command: click.BaseCommand,
command: click.Command,
ctx: click.Context,
args: list[str] | None = None,
**extra: Any,
@@ -200,7 +200,7 @@ async def _get_child_device(
if child_option is not None:
if child_option is OPTIONAL_VALUE_FLAG:
msg = _list_children()
child_index_option = click.prompt(
child_index_option = await click.prompt(
f"\n{msg}\nEnter the index number of the child device",
type=click.IntRange(0, len(device.children) - 1),
)

View File

@@ -414,7 +414,7 @@ async def shell(dev: Device) -> None:
@click.argument("parameters", default=None, required=False)
async def raw_command(ctx, module, command, parameters):
"""Run a raw command on the device."""
logging.warning("Deprecated, use 'kasa command --module %s %s'", module, command)
logging.warning("Deprecated, use 'kasa command --module %s %s'", module, command) # noqa: LOG015
return await ctx.forward(cmd_command)

View File

@@ -746,6 +746,8 @@ class Discover:
device = device_class(config.host, config=config)
sys_info = _extract_sys_info(info)
device_type = sys_info.get("mic_type", sys_info.get("type"))
if device_type is None:
raise UnsupportedDeviceError("type nor mic_type found in sysinfo response")
login_version = (
sys_info.get("stream_version") if device_type == "IOT.IPCAMERA" else None
)

View File

@@ -25,7 +25,7 @@ from warnings import warn
from ..device import Device, DeviceInfo, WifiNetwork
from ..device_type import DeviceType
from ..deviceconfig import DeviceConfig
from ..exceptions import KasaException
from ..exceptions import KasaException, UnsupportedDeviceError
from ..feature import Feature
from ..module import Module
from ..modulemapping import ModuleMapping, ModuleName
@@ -763,6 +763,9 @@ class IotDevice(Device):
# Get other info
device_family = sys_info.get("type", sys_info.get("mic_type"))
if device_family is None:
raise UnsupportedDeviceError("type nor mic_type found in sysinfo response")
device_type = IotDevice._get_device_type_from_sys_info(info)
fw_version_full = sys_info["sw_ver"]
if " " in fw_version_full: