Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Jul 31, 2024
2 parents 4a201b2 + ca0bc93 commit bd17873
Show file tree
Hide file tree
Showing 127 changed files with 3,262 additions and 3,364 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@ on:
pull_request:
branches:
- dev
types: [opened, synchronize, reopened, ready_for_review]
schedule:
# Sunday at 02:10 UTC.
- cron: '10 2 * * 0'
workflow_dispatch:

jobs:
faildraft:
name: fail draft
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
steps:
- name: fail draft
run: |
exit 1
testing:
name: ${{ matrix.os }} - ${{ matrix.python }}
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
Expand Down Expand Up @@ -98,7 +109,7 @@ jobs:
- name: ruff
if: matrix.run_lint == true
run: |
ruff .
ruff check .
- name: pytest
if: ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.12') }}
Expand All @@ -114,6 +125,7 @@ jobs:
analyze:
name: Analyze Python
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ __pycache__/
.idea/
.noseids
.pymodhis
.pypirc
.venv
.vscode
.vscode/
Expand All @@ -18,3 +19,4 @@ prof/
/pymodbus.egg-info/
venv
downloaded_files/
pymodbus.log
16 changes: 16 additions & 0 deletions API_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ API changes
Versions (X.Y.Z) where Z > 0 e.g. 3.0.1 do NOT have API changes!


API changes 3.7.0
-----------------
- default slave changed to 1 from 0 (which is broadcast).
- broadcast_enable, retry_on_empty, no_resend_on_retry parameters removed.
- class method generate_ssl() added to TLS client (sync/async).
- removed certfile, keyfile, password from TLS client, please use generate_ssl()
- on_reconnect_callback() removed from clients (sync/async).
- on_connect_callback(true/false) added to async clients.
- binary framer no longer supported
- Framer.<type> renamed to FramerType.<type>
- PDU classes moved to pymodbus/pdu
- Simulator config custom actions kwargs -> parameters
- Non defined parameters (kwargs) no longer valid
- Drop support for Python 3.8 (its no longer tested, but will probably work)


API changes 3.6.0
-----------------
- framer= is an enum: pymodbus.Framer, but still accept a framer class
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Thanks to
- Dominique Martinet
- Dries
- duc996
- Esco441-91
- Farzad Panahi
- Fredo70
- Gao Fang
Expand All @@ -54,6 +55,7 @@ Thanks to
- julian
- Justin Standring
- Kenny Johansson
- Martyy
- Matthias Straka
- laund
- Logan Gunthorpe
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,47 @@ helps make pymodbus a better product.
:ref:`Authors`: contains a complete list of volunteers have contributed to each major version.


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


Version 3.6.9
-------------
* Remove python 3.8 from CI
Expand Down
12 changes: 6 additions & 6 deletions MAKE_RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Making a release.
------------------------------------------------------------
Prepare/make release on dev.
------------------------------------------------------------
* Make pull request "prepare v3.6.x", with the following:
* Make pull request "prepare v3.7.x", with the following:
* Update pymodbus/__init__.py with version number (__version__ X.Y.Zpre)
* Update README.rst "Supported versions"
* Control / Update API_changes.rst
* Update CHANGELOG.rst
* Add commits from last release, but selectively !
git log --oneline v3.6.6..HEAD > commit.log
git log --pretty="%an" v3.6.6..HEAD | sort -uf > authors.log
git log --oneline v3.7.0..HEAD > commit.log
git log --pretty="%an" v3.7.0..HEAD | sort -uf > authors.log
update AUTHORS.rst and CHANGELOG.rst
cd doc; ./build_html
* rm -rf build/* dist/*
Expand All @@ -30,13 +30,13 @@ Prepare/make release on dev.
* git branch -D master
* wait for CI to complete on all branches
* On github "prepare release"
* Create tag e.g. v3.4.0dev0
* Title "pymodbus v3.4.0dev0"
* Create tag e.g. v3.7.0dev0
* Title "pymodbus v3.7.0dev0"
* do NOT generate release notes, but copy from CHANGELOG.rst
* make release (remember to mark pre-release if so)
* on local repo
* git pull, check release tag is pulled
* git checkout v3.0.0dev0
* git checkout v3.7.0dev0
* rm -rf build/* dist/*
* python3 -m build
* twine upload dist/* (upload to pypi)
Expand Down
11 changes: 7 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ PyModbus - A Python Modbus Stack

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

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

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

Waiting for v3.8.0 (not released) is `wait3.8.0 <https://github.com/pymodbus-dev/pymodbus/tree/wait3.8.0>`_. This contains
dev + merged pull requests that have API changes, and thus have to wait.

All changes are described in `release notes <https://pymodbus.readthedocs.io/en/latest/source/changelog.html>`_
and all API changes are `documented <https://pymodbus.readthedocs.io/en/latest/source/api_changes.html>`_

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

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

Development instructions
------------------------
The current code base is compatible with python >= 3.8.
The current code base is compatible with python >= 3.9.

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

Expand Down
2 changes: 1 addition & 1 deletion check_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ codespell
ruff check --fix --exit-non-zero-on-fix .
pylint --recursive=y examples pymodbus test
mypy pymodbus
pytest --cov --numprocesses auto
pytest -x --cov --numprocesses auto
echo "Ready to push"
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Please select a topic in the left hand column.
:hidden:

source/readme
source/api_changes
source/client
source/server
source/repl
Expand Down
Binary file modified doc/source/_static/examples.tgz
Binary file not shown.
Binary file modified doc/source/_static/examples.zip
Binary file not shown.
3 changes: 2 additions & 1 deletion doc/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ The physical devices are addressed with the :mod:`slave=` parameter.

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

The simple request calls (mixin) do NOT support broadcast, if an application wants to use broadcast
it must call :mod:`client.execute` and deal with the responses.
Expand Down
9 changes: 0 additions & 9 deletions doc/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,6 @@ Source: :github:`examples/datastore_simulator_share.py`
:noindex:


Message generator
^^^^^^^^^^^^^^^^^
Source: :github:`examples/message_generator.py`

.. automodule:: examples.message_generator
:undoc-members:
:noindex:


Message Parser
^^^^^^^^^^^^^^
Source: :github:`examples/message_parser.py`
Expand Down
24 changes: 12 additions & 12 deletions doc/source/library/framer.rst
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
Framer
======

pymodbus\.framer\.ascii_framer module
-------------------------------------
pymodbus\.framer\.ModbusAsciiFramer module
------------------------------------------

.. automodule:: pymodbus.framer.ascii_framer
.. automodule:: pymodbus.framer.ModbusAsciiFramer
:members:
:undoc-members:
:show-inheritance:

pymodbus\.framer\.binary_framer module
--------------------------------------
pymodbus\.framer\.ModbusRtuFramer module
----------------------------------------

.. automodule:: pymodbus.framer.binary_framer
.. automodule:: pymodbus.framer.ModbusRtuFramer
:members:
:undoc-members:
:show-inheritance:

pymodbus\.framer\.rtu_framer module
-----------------------------------
pymodbus\.framer\.ModbusSocketFramer module
-------------------------------------------

.. automodule:: pymodbus.framer.rtu_framer
.. automodule:: pymodbus.framer.ModbusSocketFramer
:members:
:undoc-members:
:show-inheritance:

pymodbus\.framer\.socket_framer module
--------------------------------------
pymodbus\.framer\.ModbusTlsFramer module
----------------------------------------

.. automodule:: pymodbus.framer.socket_framer
.. automodule:: pymodbus.framer.ModbusTlsFramer
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit bd17873

Please sign in to comment.