Skip to content

Commit e1b2a18

Browse files
authored
Remove unused schedulers. (#976)
1 parent d594b87 commit e1b2a18

18 files changed

+18
-77
lines changed

doc/source/library/pymodbus.client.asynchronous.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Subpackages
1313

1414
pymodbus.client.asynchronous.async_io
1515
pymodbus.client.asynchronous.factory
16-
pymodbus.client.asynchronous.schedulers
1716

1817
Submodules
1918
----------
@@ -49,5 +48,3 @@ pymodbus\.client\.asynchronous\.udp module
4948
:members:
5049
:undoc-members:
5150
:show-inheritance:
52-
53-

doc/source/library/pymodbus.client.asynchronous.schedulers.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/common/async_asyncio_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
# from pymodbus.client.asynchronous.udp import (
1515
# AsyncModbusUDPClient as ModbusClient)
16-
from pymodbus.client.asynchronous import schedulers
1716

1817
# ----------------------------------------------------------------------- #
1918
# Import the required asynchronous client
@@ -132,7 +131,7 @@ def run_with_not_running_loop():
132131
assert not loop.is_running() # nosec
133132
asyncio.set_event_loop(loop)
134133
new_loop, client = ModbusClient( # pylint: disable=unpacking-non-sequence
135-
schedulers.ASYNC_IO, port=5020, loop=loop
134+
port=5020, loop=loop
136135
)
137136
loop.run_until_complete(start_async_test(client.protocol))
138137
loop.close()
@@ -163,7 +162,6 @@ def start_loop(loop):
163162
assert loop.is_running() # nosec
164163
asyncio.set_event_loop(loop)
165164
loop, client = ModbusClient( # pylint: disable=unpacking-non-sequence
166-
schedulers.ASYNC_IO,
167165
port=5020,
168166
loop=loop,
169167
)
@@ -182,7 +180,7 @@ def run_with_no_loop():
182180
"""Create a loop."""
183181
_logger.debug("---------------------RUN_WITH_NO_LOOP-----------------")
184182
loop, client = ModbusClient( # pylint: disable=unpacking-non-sequence
185-
schedulers.ASYNC_IO, port=5020
183+
port=5020
186184
)
187185
loop.run_until_complete(start_async_test(client.protocol))
188186
loop.close()

examples/common/async_asyncio_serial_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import asyncio
1010
import logging
1111

12-
from pymodbus.client.asynchronous import schedulers
1312
from pymodbus.client.asynchronous.serial import AsyncModbusSerialClient as ModbusClient
1413

1514
# --------------------------------------------------------------------------- #
@@ -128,7 +127,6 @@ async def start_async_test(client): # pylint: disable=redefined-outer-name
128127
# socat -d -d PTY,link=/tmp/ptyp0,raw,echo=0,ispeed=9600 PTY,
129128
# link=/tmp/ttyp0,raw,echo=0,ospeed=9600
130129
loop, client = ModbusClient( # pylint: disable=unpacking-non-sequence
131-
schedulers.ASYNC_IO,
132130
port="/tmp/ttyp0", # nosec
133131
baudrate=9600,
134132
method="rtu",

examples/contrib/asynchronous_asyncio_modbus_tls_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# -------------------------------------------------------------------------- #
1111
import ssl
1212

13-
from pymodbus.client.asynchronous.schedulers import ASYNC_IO
1413
from pymodbus.client.asynchronous.tls import AsyncModbusTLSClient
1514

1615
# -------------------------------------------------------------------------- #
@@ -39,7 +38,6 @@ async def start_async_test(client):
3938
# pass SSLContext which is the context here to ModbusTcpClient()
4039
# ----------------------------------------------------------------------- #
4140
loop, new_client = AsyncModbusTLSClient( # pylint: disable=unpacking-non-sequence
42-
ASYNC_IO,
4341
"test.host.com",
4442
8020,
4543
sslctx=sslctx,

pymodbus/client/asynchronous/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
33
Example run::
44
5-
from pymodbus.client.asynchronous import schedulers
6-
75
# Import The clients
86
97
from pymodbus.client.asynchronous.tcp import AsyncModbusTCPClient as Client
108
from pymodbus.client.asynchronous.serial import AsyncModbusSerialClient as Client
119
from pymodbus.client.asynchronous.udp import AsyncModbusUDPClient as Client
1210
1311
# For asynchronous client use
14-
event_loop, client = Client(schedulers.ASYNC_IO, port=5020)
12+
event_loop, client = Client(port=5020)
1513
"""

pymodbus/client/asynchronous/factory/serial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def async_io_factory(port=None, framer=None, **kwargs):
3838

3939

4040
def get_factory():
41-
"""Get protocol factory based on the backend scheduler being used.
41+
"""Get protocol factory.
4242
4343
:return: new factory
4444
"""

pymodbus/client/asynchronous/factory/tcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def async_io_factory(host="127.0.0.1", port=Defaults.Port, **kwargs):
4141

4242

4343
def get_factory():
44-
"""Get protocol factory based on the backend scheduler being used.
44+
"""Get protocol factory.
4545
4646
:return: new factory
4747
"""

pymodbus/client/asynchronous/factory/tls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def async_io_factory(
5454

5555

5656
def get_factory():
57-
"""Get protocol factory based on the backend scheduler being used.
57+
"""Get protocol factory.
5858
5959
:return: protocol object
6060
"""

pymodbus/client/asynchronous/factory/udp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def async_io_factory(host="127.0.0.1", port=Defaults.Port, **kwargs):
3838

3939

4040
def get_factory():
41-
"""Get protocol factory based on the backend scheduler being used.
41+
"""Get protocol factory.
4242
4343
:return: new factory
4444
"""

0 commit comments

Comments
 (0)