Skip to content

Commit

Permalink
Swap pyserial-asyncio for pyserial-asyncio-fast (#158)
Browse files Browse the repository at this point in the history
* Swap pyserial-asyncio for pyserial-asyncio-fast

fixes #154

* actually commit the import change
  • Loading branch information
bdraco authored Jun 7, 2024
1 parent 059c080 commit fc65326
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dsmr_parser/clients/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import asyncio
import logging

from serial_asyncio import create_serial_connection
from serial_asyncio_fast import create_serial_connection

from dsmr_parser import telegram_specifications
from dsmr_parser.clients.telegram_buffer import TelegramBuffer
Expand Down
2 changes: 1 addition & 1 deletion dsmr_parser/clients/rfxtrx_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import asyncio

from serial_asyncio import create_serial_connection
from serial_asyncio_fast import create_serial_connection
from .protocol import DSMRProtocol, _create_dsmr_protocol


Expand Down
6 changes: 3 additions & 3 deletions dsmr_parser/clients/serial_.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import serial
import serial_asyncio
import serial_asyncio_fast

from dsmr_parser.clients.telegram_buffer import TelegramBuffer
from dsmr_parser.exceptions import ParseError, InvalidChecksumError
Expand Down Expand Up @@ -77,7 +77,7 @@ async def read(self, queue):
:rtype: None
"""
# create Serial StreamReader
conn = serial_asyncio.open_serial_connection(**self.serial_settings)
conn = serial_asyncio_fast.open_serial_connection(**self.serial_settings)
reader, _ = await conn

while True:
Expand Down Expand Up @@ -107,7 +107,7 @@ async def read_as_object(self, queue):
"""

# create Serial StreamReader
conn = serial_asyncio.open_serial_connection(**self.serial_settings)
conn = serial_asyncio_fast.open_serial_connection(**self.serial_settings)
reader, _ = await conn

while True:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
packages=find_packages(exclude=('test', 'test.*')),
install_requires=[
'pyserial>=3,<4',
'pyserial-asyncio<1',
'pyserial-asyncio-fast>=0.11',
'pytz',
'Tailer==0.4.1',
'dlms_cosem==21.3.2'
Expand Down

0 comments on commit fc65326

Please sign in to comment.