Skip to content

Commit b03c6ea

Browse files
committed
please python 3.8
1 parent ce3d429 commit b03c6ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymodbus/client/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__( # pylint: disable=too-many-arguments
8585
setup_params = CommParams(
8686
comm_type=kwargs.get("CommType"),
8787
comm_name="comm",
88-
source_address=kwargs.get("source_address", ("localhost", 0)),
88+
source_address=kwargs.get("source_address", ("127.0.0.1", 0)),
8989
reconnect_delay=reconnect_delay,
9090
reconnect_delay_max=reconnect_delay_max,
9191
timeout_connect=timeout,

pymodbus/transport/transport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class CommParams:
3535
reconnect_delay: float = None
3636
reconnect_delay_max: float = None
3737
timeout_connect: float = None
38-
host: str = "localhost"
38+
host: str = "127.0.0.1"
3939
port: int = 0
40-
source_address: tuple[str, int] = ("localhost", 0)
40+
source_address: tuple[str, int] = ("127.0.0.1", 0)
4141

4242
# tls
4343
sslctx: ssl.SSLContext = None
@@ -93,7 +93,7 @@ class ModbusProtocol(asyncio.BaseProtocol):
9393
9494
Host/Port/SourceAddress explanation:
9595
- SourceAddress:
96-
- server: (host, port) to listen on (default is ("localhost", 502/802))
96+
- server: (host, port) to listen on (default is ("127.0.0.1", 502/802))
9797
- server serial: (host, _) to open/connect and listen on
9898
- client: (Bind local part to interface (default is local interface)
9999
- client serial: (host, _) to open/connect and listen on

0 commit comments

Comments
 (0)