Add python 3.14 to supported versions by rytilahti · Pull Request #1599 · python-kasa/python-kasa
@rytilahti There's a regression problem in asyncclick v8.3.0, it's not in v8.2.0, so I did some testing and modified the following to get it to work:
pyproject.toml:
dependencies = [
"asyncclick>=8.2.0,<8.3.0",
"cryptography>=1.9",
"aiohttp>=3",
"tzdata>=2024.2 ; platform_system == 'Windows'",
"mashumaro>=3.20",
]
cli/common.py:
if child_option is not None:
if child_option is OPTIONAL_VALUE_FLAG:
msg = _list_children()
child_index_option = click.prompt(
f"\n{msg}\nEnter the index number of the child device",
type=click.IntRange(0, len(device.children) - 1),
)
elif child := device.get_child_device(child_option):
echo(f"Targeting child device {child.alias}")
return child
else:
error(
"No child device found with device_id or name: "
f"{child_option} children are:\n{_list_children()}"
)
This updates asyncclick to a version that works for the test but without the regression of the flag issue until it's resolved in v8.3.2, according to their maintainer. Then removes the 'await' from the click.prompt because it's not required in v8.2.0, just v8.3.0. Everything should support Python 3.14 correctly now and it looks good from this end.