Skip to content

Commit 508c2bf

Browse files
committed
Migrate to serialx
1 parent 63ea14f commit 508c2bf

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

plugwise_usb/connection/manager.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import logging
88
from typing import Any
99

10-
from serial import EIGHTBITS, PARITY_NONE, STOPBITS_ONE, SerialException
11-
from serial_asyncio_fast import SerialTransport, create_serial_connection
10+
from serialx import SerialException, SerialTransport, create_serial_connection
1211

1312
from ..api import StickEvent
1413
from ..exceptions import StickError
@@ -128,13 +127,13 @@ async def setup_connection_to_stick(self, serial_path: str) -> None:
128127
self._receiver,
129128
) = await wait_for(
130129
create_serial_connection(
131-
loop,
130+
loop=loop,
132131
lambda: self._receiver,
133132
url=serial_path,
134133
baudrate=115200,
135-
bytesize=EIGHTBITS,
136-
stopbits=STOPBITS_ONE,
137-
parity=PARITY_NONE,
134+
bytesize=8,
135+
stopbits=1,
136+
parity="N",
138137
xonxoff=False,
139138
),
140139
timeout=5,

plugwise_usb/connection/receiver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import logging
3434
from typing import Any, Final
3535

36-
from serial_asyncio_fast import SerialTransport
36+
from serialx import SerialTransport
3737

3838
from ..api import StickEvent
3939
from ..constants import MESSAGE_FOOTER, MESSAGE_HEADER

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ maintainers = [
2727
]
2828
requires-python = ">=3.13.0"
2929
dependencies = [
30-
"pyserial-asyncio-fast",
3130
"aiofiles",
3231
"crcmod",
3332
"semver",
33+
"serialx",
3434
]
3535

3636
[project.urls]

requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pytest-asyncio
55
radon==6.0.1
66
types-python-dateutil
7-
pyserial-asyncio-fast
87
aiofiles
98
freezegun
109
pytest-cov
10+
serialx

0 commit comments

Comments
 (0)