Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Ongoing

PR [433](https://github.com/plugwise/python-plugwise-usb/pull/443): Migrate to serialx
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

## v0.47.6 - 2026-03-11

PR [425](https://github.com/plugwise/python-plugwise-usb/pull/425): More 0138-related improvements
Expand Down
13 changes: 2 additions & 11 deletions plugwise_usb/connection/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 SerialException, SerialTransport, create_serial_connection
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

from ..api import StickEvent
from ..exceptions import StickError
Expand Down Expand Up @@ -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 (SerialException, TimeoutError, TypeError, ValueError) as err:
Comment thread
bouwew marked this conversation as resolved.
Outdated
raise StickError(
f"Failed to open serial connection to {serial_path}"
) from err
Expand Down
2 changes: 1 addition & 1 deletion plugwise_usb/connection/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -27,10 +27,10 @@ maintainers = [
]
requires-python = ">=3.13.0"
dependencies = [
"pyserial-asyncio-fast",
"aiofiles",
"crcmod",
"semver",
"serialx",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if serialx is available and get version info
pip index versions serialx 2>/dev/null | head -20

# Check the package metadata if available
curl -s https://pypi.org/pypi/serialx/json | jq -r '.info | {name, version, author, home_page, requires_python, summary}'

Repository: plugwise/python-plugwise-usb

Length of output: 546


🌐 Web query:

What is the latest stable version of the serialx Python library and what are its Python version requirements?

💡 Result:

As of May 18, 2026, the latest stable version of the serialx Python library is v1.7.3 [1]. This library requires Python 3.10 or newer [1].

Citations:


Add a version constraint to the serialx dependency.

The dependency on serialx lacks a version specifier. Since serialx 1.8.0 is the latest stable release, consider pinning to at least >=1.8.0 or >=1.7.0,<2.0.0 to prevent unexpected breaking changes from future releases.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 32, The pyproject.toml dependency entry for "serialx"
is missing a version constraint; update the dependency string "serialx" in
pyproject.toml to include a conservative version specifier (for example
"serialx>=1.8.0" or "serialx>=1.7.0,<2.0.0") to prevent pulling breaking changes
from future releases.

]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pytest-asyncio
radon==6.0.1
types-python-dateutil
pyserial-asyncio-fast
aiofiles
freezegun
pytest-cov
serialx
2 changes: 1 addition & 1 deletion tests/test_usb.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ async def test_stick_connect_without_port(self) -> None:

with pytest.raises(pw_exceptions.StickError):
await stick.connect()
stick.port = "null"
stick.port = None
with pytest.raises(pw_exceptions.StickError):
await stick.connect()
await stick.disconnect()
Expand Down