Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a5509e4

Browse files
Merge branch 'dev'
2 parents 7e333a4 + cb73805 commit a5509e4

File tree

21 files changed

+78
-65
lines changed

21 files changed

+78
-65
lines changed

‎CHANGELOG.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ helps make pymodbus a better product.
77

88
:ref:`Authors`: contains a complete list of volunteers have contributed to each major version.
99

10+
Version 3.11.3
11+
--------------
12+
* Coverage 100% (using no cover, when needed). (#2783)
13+
* Create pypi alias for home-assistant. (#2782)
14+
* Bump utilities in pyproject.toml. (#2780)
15+
* Fix pymodbus.simulator. (#2773)
1016

1117
Version 3.11.2
1218
--------------

‎MAKE_RELEASE.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Prepare/make release on dev.
2121
cd doc; ./build_html
2222
* rm -rf build/* dist/*
2323
* python3 -m build
24+
* pypi-alias pymodbus_ha_core
2425
* twine check dist/*
2526
* Commit, push and merge.
2627
* Wait for CI to complete

‎README.rst‎

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ as well as the
3535
`API_changes <https://github.com/pymodbus-dev/pymodbus/blob/dev/API_changes.rst>`_
3636
files.
3737

38-
Current release is `3.11.2 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.11.2>`_.
38+
Current release is `3.11.3 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.11.3>`_.
3939

4040
Bleeding edge (not released) is `dev <https://github.com/pymodbus-dev/pymodbus/tree/dev>`_.
4141

@@ -48,14 +48,31 @@ Source code on `github <https://github.com/pymodbus-dev/pymodbus>`_
4848

4949
Full documentation for newest releases as well as the bleeding edge (dev) `readthedocs <https://pymodbus.readthedocs.io>`_
5050

51+
pymodbus is maintained in 2 versions:
52+
- pymodbus, the official library
53+
- pymodbus_ha_core
54+
55+
Pymodbus_ha_core
56+
----------------
57+
`Pymodbus_ha_core <https://pypi.org/project/pymodbus-ha-core/>`_ is
58+
an alias to pymodbus, available on pypi.org.
59+
60+
Being an alias means it is 100% the same as pymodbus, without any extra
61+
code, just another name.
62+
63+
This allows home-assistant to use a pymodbus version for the modbus integration,
64+
while custom_components use another version.
65+
66+
We are offering to make other aliases for projects who need this, please
67+
open an issue in the pymodbus project, with an explanation of why it is
68+
needed.
5169

5270
Pymodbus in a nutshell
5371
----------------------
5472
Pymodbus consist of 5 parts:
5573

5674
- **client**, connect to your favorite device(s)
5775
- **server**, simulate your favorite device(s)
58-
- **repl**, a commandline text based client/server simulator
5976
- **simulator**, an html based server simulator
6077
- **examples**, showing both simple and advances usage
6178

@@ -99,17 +116,6 @@ Server Features
99116
`Server documentation <https://pymodbus.readthedocs.io/en/latest/source/server.html>`_
100117

101118

102-
REPL Features
103-
^^^^^^^^^^^^^
104-
- Server/client commandline emulator
105-
- Easy test of real device (client)
106-
- Easy test of client app (server)
107-
- Simulation of broken requests/responses
108-
- Simulation of error responses (hard to provoke in real devices)
109-
110-
`REPL documentation <https://github.com/pymodbus-dev/repl>`_
111-
112-
113119
Simulator Features
114120
^^^^^^^^^^^^^^^^^^
115121
- Server simulator with WEB interface
@@ -182,7 +188,6 @@ This will install pymodbus with the pyserial dependency.
182188

183189
Pymodbus offers a number of extra options:
184190

185-
- **repl**, needed by pymodbus.repl
186191
- **serial**, needed for serial communication
187192
- **simulator**, needed by pymodbus.simulator
188193
- **documentation**, needed to generate documentation

‎doc/source/_static/examples.tgz‎

83 Bytes
Binary file not shown.

‎doc/source/_static/examples.zip‎

148 Bytes
Binary file not shown.

‎examples/client_sync.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def run_sync_client(client, modbus_calls=None):
119119
"""Run sync client."""
120120
_logger.info("### Client starting")
121121
client.connect()
122-
if modbus_calls:
122+
if modbus_calls:# pragma: no cover
123123
modbus_calls(client)
124124
client.close()
125125
_logger.info("### End of Program")

‎examples/custom_msg.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def encode(self):
5454
:returns: The encoded packet message
5555
"""
5656
res = struct.pack(">B", len(self.values) * 2)
57-
for register in self.values:
57+
for register in self.values:# pragma: no cover
5858
res += struct.pack(">H", register)
5959
return res
6060

@@ -65,7 +65,7 @@ def decode(self, data):
6565
"""
6666
byte_count = int(data[0])
6767
self.values = []
68-
for i in range(1, byte_count + 1, 2):
68+
for i in range(1, byte_count + 1, 2):# pragma: no cover
6969
self.values.append(struct.unpack(">H", data[i : i + 2])[0])
7070

7171

@@ -144,7 +144,7 @@ async def main(host="localhost", port=5020):
144144
request1 = CustomRequest(32, device_id=device_id)
145145
try:
146146
result = await client.execute(False, request1)
147-
except ModbusIOException:
147+
except ModbusIOException:# pragma: no cover
148148
print("Server do not support CustomRequest.")
149149
else:
150150
print(result)

‎examples/datastore_simulator_share.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ def get_commandline(cmdline=None):
142142

143143
def setup_simulator(setup=None, actions=None, cmdline=None):
144144
"""Run server setup."""
145-
if not setup:
145+
if not setup:# pragma: no cover
146146
setup=demo_config
147-
if not actions:
147+
if not actions:# pragma: no cover
148148
actions=demo_actions
149149
args = get_commandline(cmdline=cmdline)
150150
pymodbus_apply_logging_config(args.log.upper())

‎examples/helper.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def get_commandline(server: bool = False, description: str | None = None, extras
9292
default=10,
9393
type=float,
9494
)
95-
if extras:
95+
if extras:# pragma: no cover
9696
for extra in extras:
9797
parser.add_argument(extra[0], **extra[1])
9898
args = parser.parse_args(cmdline)
@@ -120,13 +120,13 @@ def get_certificate(suffix: str):
120120
"""Get example certificate."""
121121
delimiter = "\\" if os.name == "nt" else "/"
122122
cwd = os.getcwd().split(delimiter)[-1]
123-
if cwd == "examples":
123+
if cwd == "examples":# pragma: no cover
124124
path = "."
125-
elif cwd == "sub_examples":
125+
elif cwd == "sub_examples":# pragma: no cover
126126
path = "../../examples"
127-
elif cwd == "test":
127+
elif cwd == "test":# pragma: no cover
128128
path = "../examples"
129-
elif cwd == "pymodbus":
129+
elif cwd == "pymodbus":# pragma: no cover
130130
path = "examples"
131131
else:
132132
raise RuntimeError(f"**Error** Cannot find certificate path={cwd}")

‎examples/message_parser.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def report(self, message):
9696
f"{'name':.15s} = {message.__class__.__name__}"
9797
)
9898
for k_dict, v_dict in message.__dict__.items():
99-
if isinstance(v_dict, dict):
99+
if isinstance(v_dict, dict):# pragma: no cover
100100
print(f"{k_dict:.15s} =")
101101
for k_item, v_item in v_dict.items():
102102
print(f" {k_item:.12s} => {v_item}"
@@ -121,7 +121,7 @@ def parse_messages(cmdline=None):
121121
args = get_commandline(cmdline=cmdline)
122122
pymodbus_apply_logging_config(args.log.upper())
123123
_logger.setLevel(args.log.upper())
124-
if not args.message:
124+
if not args.message:# pragma: no cover
125125
_logger.error("Missing --message.")
126126
return
127127

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /