diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index f82cfebd6..7a312203d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -4,7 +4,7 @@ name: Latest release env: - CACHE_VERSION: 1 + CACHE_VERSION: 2 DEFAULT_PYTHON: "3.14" # Only run on merges diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index b3b4f6a98..1a81ae365 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -4,7 +4,7 @@ name: Latest commit env: - CACHE_VERSION: 2 + CACHE_VERSION: 3 DEFAULT_PYTHON: "3.14" VENV: venv diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d9bb8190..b78575216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Ongoing + +PR [433](https://github.com/plugwise/python-plugwise-usb/pull/443): Migrate to serialx + ## v0.47.6 - 2026-03-11 PR [425](https://github.com/plugwise/python-plugwise-usb/pull/425): More 0138-related improvements diff --git a/plugwise_usb/connection/manager.py b/plugwise_usb/connection/manager.py index 7dea480be..4d6a13bb9 100644 --- a/plugwise_usb/connection/manager.py +++ b/plugwise_usb/connection/manager.py @@ -7,8 +7,7 @@ import logging from typing import Any -from serial import EIGHTBITS, PARITY_NONE, STOPBITS_ONE, SerialException -from serial_asyncio_fast import SerialTransport, create_serial_connection +from serialx import SerialTransport, create_serial_connection from ..api import StickEvent from ..exceptions import StickError @@ -132,18 +131,10 @@ async def setup_connection_to_stick(self, serial_path: str) -> None: lambda: self._receiver, url=serial_path, baudrate=115200, - bytesize=EIGHTBITS, - stopbits=STOPBITS_ONE, - parity=PARITY_NONE, - xonxoff=False, ), timeout=5, ) - except SerialException as err: - raise StickError( - f"Failed to open serial connection to {serial_path}" - ) from err - except TimeoutError as err: + except (OSError, TypeError, ValueError) as err: raise StickError( f"Failed to open serial connection to {serial_path}" ) from err diff --git a/plugwise_usb/connection/receiver.py b/plugwise_usb/connection/receiver.py index 4651dab6f..1dee3f8a4 100644 --- a/plugwise_usb/connection/receiver.py +++ b/plugwise_usb/connection/receiver.py @@ -33,7 +33,7 @@ import logging from typing import Any, Final -from serial_asyncio_fast import SerialTransport +from serialx import SerialTransport from ..api import StickEvent from ..constants import MESSAGE_FOOTER, MESSAGE_HEADER diff --git a/pyproject.toml b/pyproject.toml index 8d6a058d9..dc1d282a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plugwise_usb" -version = "0.47.6" +version = "0.47.7a0" license = "MIT" keywords = ["home", "automation", "plugwise", "module", "usb"] classifiers = [ @@ -12,7 +12,6 @@ classifiers = [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 3.14", - "Programming Language :: Python :: 3.13", "Topic :: Home Automation", ] authors = [ @@ -25,12 +24,12 @@ maintainers = [ { name = "CoMPaTech" }, { name = "dirixmjm" } ] -requires-python = ">=3.13.0" +requires-python = ">=3.14.0" dependencies = [ - "pyserial-asyncio-fast", "aiofiles", "crcmod", "semver", + "serialx", ] [project.urls] diff --git a/requirements_test.txt b/requirements_test.txt index 8ba5106ed..6aa256bc4 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -4,7 +4,7 @@ pytest-asyncio radon==6.0.1 types-python-dateutil -pyserial-asyncio-fast aiofiles freezegun pytest-cov +serialx