From 823194d6f9add0051189cd27514d028810d0b32a Mon Sep 17 00:00:00 2001 From: mh7d <66883304+mh7d@users.noreply.github.com> Date: Sun, 2 Jan 2022 17:05:08 +0100 Subject: [PATCH 1/2] removed unused loop for asyncio-timeout fixed version for dependencies --- setup.py | 6 +++--- sml/asyncio.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index d6a401a..54d4949 100644 --- a/setup.py +++ b/setup.py @@ -27,8 +27,8 @@ 'Topic :: Software Development :: Libraries :: Python Modules', ], install_requires=[ - 'async-timeout>=3.0.1', - 'bitstring>=3.1.5', - 'pyserial-asyncio>=0.4', + 'async-timeout~=4.0', + 'bitstring~=3.1', + 'pyserial-asyncio~=0.6', ], ) diff --git a/sml/asyncio.py b/sml/asyncio.py index 36ca7c4..3835e1a 100644 --- a/sml/asyncio.py +++ b/sml/asyncio.py @@ -104,7 +104,7 @@ async def _reconnect(self, delay: int = 10): await self._disconnect() await asyncio.sleep(delay, loop=self._loop) try: - async with timeout(5, loop=self._loop): + async with timeout(5): self._transport, _ = await self._create_connection() except (BrokenPipeError, ConnectionRefusedError, SerialException, asyncio.TimeoutError) as exc: From 87ccd8b493bcf156acb11ff19e25d943475836ee Mon Sep 17 00:00:00 2001 From: mh7d <66883304+mh7d@users.noreply.github.com> Date: Mon, 3 Jan 2022 10:56:14 +0100 Subject: [PATCH 2/2] changed version requirements in setup.py --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 54d4949..3ca26c3 100644 --- a/setup.py +++ b/setup.py @@ -27,8 +27,8 @@ 'Topic :: Software Development :: Libraries :: Python Modules', ], install_requires=[ - 'async-timeout~=4.0', - 'bitstring~=3.1', - 'pyserial-asyncio~=0.6', + 'async-timeout>=4.0', + 'bitstring>=3.1', + 'pyserial-asyncio>=0.6', ], )