Skip to content

Commit bd17873

Browse files
committed
Merge branch 'dev'
2 parents 4a201b2 + ca0bc93 commit bd17873

File tree

127 files changed

+3262
-3364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+3262
-3364
lines changed

.github/workflows/ci.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,25 @@ on:
1010
pull_request:
1111
branches:
1212
- dev
13+
types: [opened, synchronize, reopened, ready_for_review]
1314
schedule:
1415
# Sunday at 02:10 UTC.
1516
- cron: '10 2 * * 0'
1617
workflow_dispatch:
1718

1819
jobs:
20+
faildraft:
21+
name: fail draft
22+
if: github.event.pull_request.draft == true
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: fail draft
26+
run: |
27+
exit 1
28+
1929
testing:
2030
name: ${{ matrix.os }} - ${{ matrix.python }}
31+
if: github.event.pull_request.draft == false
2132
runs-on: ${{ matrix.os }}
2233
timeout-minutes: 20
2334
strategy:
@@ -98,7 +109,7 @@ jobs:
98109
- name: ruff
99110
if: matrix.run_lint == true
100111
run: |
101-
ruff .
112+
ruff check .
102113
103114
- name: pytest
104115
if: ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.12') }}
@@ -114,6 +125,7 @@ jobs:
114125
115126
analyze:
116127
name: Analyze Python
128+
if: github.event.pull_request.draft == false
117129
runs-on: ubuntu-22.04
118130
timeout-minutes: 10
119131
steps:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ __pycache__/
99
.idea/
1010
.noseids
1111
.pymodhis
12+
.pypirc
1213
.venv
1314
.vscode
1415
.vscode/
@@ -18,3 +19,4 @@ prof/
1819
/pymodbus.egg-info/
1920
venv
2021
downloaded_files/
22+
pymodbus.log

API_changes.rst

+16
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ API changes
33
Versions (X.Y.Z) where Z > 0 e.g. 3.0.1 do NOT have API changes!
44

55

6+
API changes 3.7.0
7+
-----------------
8+
- default slave changed to 1 from 0 (which is broadcast).
9+
- broadcast_enable, retry_on_empty, no_resend_on_retry parameters removed.
10+
- class method generate_ssl() added to TLS client (sync/async).
11+
- removed certfile, keyfile, password from TLS client, please use generate_ssl()
12+
- on_reconnect_callback() removed from clients (sync/async).
13+
- on_connect_callback(true/false) added to async clients.
14+
- binary framer no longer supported
15+
- Framer.<type> renamed to FramerType.<type>
16+
- PDU classes moved to pymodbus/pdu
17+
- Simulator config custom actions kwargs -> parameters
18+
- Non defined parameters (kwargs) no longer valid
19+
- Drop support for Python 3.8 (its no longer tested, but will probably work)
20+
21+
622
API changes 3.6.0
723
-----------------
824
- framer= is an enum: pymodbus.Framer, but still accept a framer class

AUTHORS.rst

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Thanks to
3333
- Dominique Martinet
3434
- Dries
3535
- duc996
36+
- Esco441-91
3637
- Farzad Panahi
3738
- Fredo70
3839
- Gao Fang
@@ -54,6 +55,7 @@ Thanks to
5455
- julian
5556
- Justin Standring
5657
- Kenny Johansson
58+
- Martyy
5759
- Matthias Straka
5860
- laund
5961
- Logan Gunthorpe

CHANGELOG.rst

+41
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,47 @@ helps make pymodbus a better product.
88
:ref:`Authors`: contains a complete list of volunteers have contributed to each major version.
99

1010

11+
Version 3.7.0
12+
-------------
13+
* Remove unneeded client parameters. (#2272)
14+
* simulator: Fix context single parameter (#2264)
15+
* buildPacket can be used for Request and Response (#2262)
16+
* More descriptive decoder exceptions (#2260)
17+
* Cleanup ReadWriteMultipleRegistersResponse and testing (#2261)
18+
* Feature/simulator addressing (#2258)
19+
* Framer optimization (apart from RTU). (#2146)
20+
* Use mock.patch.object to avoid protected access errors. (#2251)
21+
* Fix some mypy type checking errors in test_transaction.py (#2250)
22+
* Update check for windows platform (#2247)
23+
* Logging 100% coverage. (#2248)
24+
* CI, Block draft PRs to use CPU minutes. (#2245, #2246)
25+
* Remove kwargs client. (#2243, #2244, #2257)
26+
* remove kwargs PDU messagees. (#2240)
27+
* Remove message_generator example (not part of API). (#2239)
28+
* Update dev dependencies (#2241)
29+
* Fix ruff check in CI (#2242)
30+
* Remove kwargs. (#2236, #2237)
31+
* Simulator config, kwargs -> parameters. (#2235)
32+
* Refactor transaction handling to better separate async and sync code. (#2232)
33+
* Simplify some BinaryPayload pack operations (#2224)
34+
* Fix writing to serial (rs485) on windows os. (#2191)
35+
* Remember to remove serial writer. (#2209)
36+
* Transaction_id for serial == 0. (#2208)
37+
* Solve pylint error.
38+
* Sync TLS needs time before reading frame (#2186)
39+
* Update transaction.py (#2174)
40+
* PDU classes --> pymodbus/pdu. (#2160)
41+
* Speed up no data detection. (#2150)
42+
* RTU decode hunt part. (#2138)
43+
* Dislodge client classes from modbusProtocol. (#2137)
44+
* Merge new message layer and old framer directory. (#2135)
45+
* Coverage == 91%. (#2132)
46+
* Remove binary_framer. (#2130)
47+
* on_reconnect_callback --> on_connect_callback. (#2122)
48+
* Remove certfile,keyfile,password from TLS client. (#2121)
49+
* Drop support for python 3.8 (#2112)
50+
51+
1152
Version 3.6.9
1253
-------------
1354
* Remove python 3.8 from CI

MAKE_RELEASE.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ Making a release.
88
------------------------------------------------------------
99
Prepare/make release on dev.
1010
------------------------------------------------------------
11-
* Make pull request "prepare v3.6.x", with the following:
11+
* Make pull request "prepare v3.7.x", with the following:
1212
* Update pymodbus/__init__.py with version number (__version__ X.Y.Zpre)
1313
* Update README.rst "Supported versions"
1414
* Control / Update API_changes.rst
1515
* Update CHANGELOG.rst
1616
* Add commits from last release, but selectively !
17-
git log --oneline v3.6.6..HEAD > commit.log
18-
git log --pretty="%an" v3.6.6..HEAD | sort -uf > authors.log
17+
git log --oneline v3.7.0..HEAD > commit.log
18+
git log --pretty="%an" v3.7.0..HEAD | sort -uf > authors.log
1919
update AUTHORS.rst and CHANGELOG.rst
2020
cd doc; ./build_html
2121
* rm -rf build/* dist/*
@@ -30,13 +30,13 @@ Prepare/make release on dev.
3030
* git branch -D master
3131
* wait for CI to complete on all branches
3232
* On github "prepare release"
33-
* Create tag e.g. v3.4.0dev0
34-
* Title "pymodbus v3.4.0dev0"
33+
* Create tag e.g. v3.7.0dev0
34+
* Title "pymodbus v3.7.0dev0"
3535
* do NOT generate release notes, but copy from CHANGELOG.rst
3636
* make release (remember to mark pre-release if so)
3737
* on local repo
3838
* git pull, check release tag is pulled
39-
* git checkout v3.0.0dev0
39+
* git checkout v3.7.0dev0
4040
* rm -rf build/* dist/*
4141
* python3 -m build
4242
* twine upload dist/* (upload to pypi)

README.rst

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ PyModbus - A Python Modbus Stack
1111

1212
Pymodbus is a full Modbus protocol implementation offering client/server with synchronous/asynchronous API a well as simulators.
1313

14-
Current release is `3.6.9 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.6.9>`_.
14+
Current release is `3.7.0 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.7.0>`_.
1515

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

18+
Waiting for v3.8.0 (not released) is `wait3.8.0 <https://github.com/pymodbus-dev/pymodbus/tree/wait3.8.0>`_. This contains
19+
dev + merged pull requests that have API changes, and thus have to wait.
20+
1821
All changes are described in `release notes <https://pymodbus.readthedocs.io/en/latest/source/changelog.html>`_
1922
and all API changes are `documented <https://pymodbus.readthedocs.io/en/latest/source/api_changes.html>`_
2023

@@ -40,9 +43,9 @@ Common features
4043
* support all standard frames: socket, rtu, rtu-over-tcp, tcp and ascii
4144
* does not have third party dependencies, apart from pyserial (optional)
4245
* very lightweight project
43-
* requires Python >= 3.8
46+
* requires Python >= 3.9
4447
* thorough test suite, that test all corners of the library
45-
* automatically tested on Windows, Linux and MacOS combined with python 3.8 - 3.12
48+
* automatically tested on Windows, Linux and MacOS combined with python 3.9 - 3.12
4649
* strongly typed API (py.typed present)
4750

4851
The modbus protocol specification: Modbus_Application_Protocol_V1_1b3.pdf can be found on
@@ -276,7 +279,7 @@ There are 2 bigger projects ongoing:
276279

277280
Development instructions
278281
------------------------
279-
The current code base is compatible with python >= 3.8.
282+
The current code base is compatible with python >= 3.9.
280283

281284
Here are some of the common commands to perform a range of activities::
282285

check_ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ codespell
99
ruff check --fix --exit-non-zero-on-fix .
1010
pylint --recursive=y examples pymodbus test
1111
mypy pymodbus
12-
pytest --cov --numprocesses auto
12+
pytest -x --cov --numprocesses auto
1313
echo "Ready to push"

doc/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Please select a topic in the left hand column.
99
:hidden:
1010

1111
source/readme
12+
source/api_changes
1213
source/client
1314
source/server
1415
source/repl

doc/source/_static/examples.tgz

-912 Bytes
Binary file not shown.

doc/source/_static/examples.zip

-327 Bytes
Binary file not shown.

doc/source/client.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ The physical devices are addressed with the :mod:`slave=` parameter.
177177

178178
:mod:`slave=0` is used as broadcast in order to address all devices.
179179
However experience shows that modern devices do not allow broadcast, mostly because it is
180-
inheriently dangerous. With :mod:`slave=0` the application can get upto 254 responses on a single request!
180+
inheriently dangerous. With :mod:`slave=0` the application can get upto 254 responses on a single request,
181+
and this is not handled with the normal API calls!
181182

182183
The simple request calls (mixin) do NOT support broadcast, if an application wants to use broadcast
183184
it must call :mod:`client.execute` and deal with the responses.

doc/source/examples.rst

-9
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,6 @@ Source: :github:`examples/datastore_simulator_share.py`
177177
:noindex:
178178

179179

180-
Message generator
181-
^^^^^^^^^^^^^^^^^
182-
Source: :github:`examples/message_generator.py`
183-
184-
.. automodule:: examples.message_generator
185-
:undoc-members:
186-
:noindex:
187-
188-
189180
Message Parser
190181
^^^^^^^^^^^^^^
191182
Source: :github:`examples/message_parser.py`

doc/source/library/framer.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
Framer
22
======
33

4-
pymodbus\.framer\.ascii_framer module
5-
-------------------------------------
4+
pymodbus\.framer\.ModbusAsciiFramer module
5+
------------------------------------------
66

7-
.. automodule:: pymodbus.framer.ascii_framer
7+
.. automodule:: pymodbus.framer.ModbusAsciiFramer
88
:members:
99
:undoc-members:
1010
:show-inheritance:
1111

12-
pymodbus\.framer\.binary_framer module
13-
--------------------------------------
12+
pymodbus\.framer\.ModbusRtuFramer module
13+
----------------------------------------
1414

15-
.. automodule:: pymodbus.framer.binary_framer
15+
.. automodule:: pymodbus.framer.ModbusRtuFramer
1616
:members:
1717
:undoc-members:
1818
:show-inheritance:
1919

20-
pymodbus\.framer\.rtu_framer module
21-
-----------------------------------
20+
pymodbus\.framer\.ModbusSocketFramer module
21+
-------------------------------------------
2222

23-
.. automodule:: pymodbus.framer.rtu_framer
23+
.. automodule:: pymodbus.framer.ModbusSocketFramer
2424
:members:
2525
:undoc-members:
2626
:show-inheritance:
2727

28-
pymodbus\.framer\.socket_framer module
29-
--------------------------------------
28+
pymodbus\.framer\.ModbusTlsFramer module
29+
----------------------------------------
3030

31-
.. automodule:: pymodbus.framer.socket_framer
31+
.. automodule:: pymodbus.framer.ModbusTlsFramer
3232
:members:
3333
:undoc-members:
3434
:show-inheritance:

0 commit comments

Comments
 (0)