Skip to content

Commit 14d9c37

Browse files
committed
Merge branch 'dev'
2 parents bff39f6 + 6b795f1 commit 14d9c37

File tree

102 files changed

+3576
-4194
lines changed

Some content is hidden

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

102 files changed

+3576
-4194
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
integreation_test:
6262
name: pytest - ${{ matrix.os.on }} - ${{ matrix.python.version }}
6363
runs-on: ${{ matrix.os.on }}
64-
needs: linters
6564
timeout-minutes: 10
6665
strategy:
6766
fail-fast: false
@@ -75,16 +74,6 @@ jobs:
7574
- version: '3.9'
7675
- version: '3.10'
7776
- version: '3.11'
78-
- version: pypy-3.8
79-
exclude:
80-
- os:
81-
on: macos-latest
82-
python:
83-
version: pypy-3.8
84-
- os:
85-
on: windows-latest
86-
python:
87-
version: pypy-3.8
8877
steps:
8978
- name: Checkout repository
9079
uses: actions/checkout@v3
@@ -105,12 +94,29 @@ jobs:
10594
run: pip install -e . -r requirements.txt
10695

10796
- name: pytest
108-
run: pytest --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20
97+
run: pytest -n0 --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20
98+
99+
analyze:
100+
name: Analyze Python
101+
runs-on: ubuntu-22.04
102+
103+
steps:
104+
- uses: actions/checkout@v3
105+
106+
- uses: github/codeql-action/init@v2
107+
with:
108+
languages: python
109+
110+
- uses: github/codeql-action/autobuild@v2
111+
112+
- uses: github/codeql-action/analyze@v2
109113

110114
ci_complete:
111115
name: ci_complete
112116
runs-on: ubuntu-latest
113117
needs:
118+
- linters
119+
- analyze
114120
- integreation_test
115121
timeout-minutes: 1
116122
steps:

.github/workflows/clean_workflow_runs.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
name: Clean workflow runs
22
on:
3-
# schedule:
4-
# # Monthly day 1 at 0:35 UTC.
5-
# - cron: '35 0 1 1-12 *'
63
workflow_dispatch:
7-
inputs:
8-
retain_days:
9-
description: 'retain days (default 14)'
10-
required: true
11-
default: 14
12-
keep_minimum_runs:
13-
description: 'keep minimum runs (default 6)'
14-
required: true
15-
default: 6
164

175
permissions:
186
actions: write
@@ -26,8 +14,6 @@ jobs:
2614
with:
2715
token: ${{ github.token }}
2816
repository: ${{ github.repository }}
29-
retain_days: ${{ github.events.inputs.retain_days }}
30-
keep_minimum_runs: ${{ github.events.inputs.keep_minimum_runs }}
3117

3218
clear-cache:
3319
runs-on: ubuntu-latest

.github/workflows/docker-publish.yml

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

.github/workflows/lock.yaml

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

.github/workflows/stale.yml renamed to .github/workflows/stale_lock.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
- cron: "30 1 * * *"
66
workflow_dispatch:
77

8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: lock
14+
815
jobs:
916
stale:
1017
runs-on: ubuntu-latest
@@ -24,3 +31,8 @@ jobs:
2431
exempt-issue-labels: 'Bug,Enhancements,Investigating'
2532
stale-pr-label: 'no-pr-activity'
2633
remove-stale-when-updated: true
34+
- uses: dessant/lock-threads@v4
35+
with:
36+
github-token: ${{ github.token }}
37+
issue-inactive-days: '10'
38+
pr-inactive-days: '10'

API_changes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
PyModbus - API changes.
33
=======================
44

5+
-------------
6+
Version 3.4.0
7+
-------------
8+
- Modbus<x>Client .connect() returns True/False (connected or not)
9+
- Modbue<x>Server handler=, allow_reuse_addr=, backlog= are no longer accepted
10+
- ModbusTcpClient / AsyncModbusTcpClient no longer support unix path
11+
- StartAsyncUnixServer / ModbusUnixServer removed (never worked on Windows)
12+
- ModbusTlsServer reqclicert= is no longer accepted
13+
- ModbusSerialServer auto_connect= is no longer accepted
14+
- ModbusSimulatorServer.serve_forever(only_start=False) added to allow return
15+
16+
517
-------------
618
Version 3.3.1
719
-------------

CHANGELOG.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
version 3.4.0
2+
----------------------------------------------------------
3+
* Prepare v3.4.0.
4+
* Handle partial local echo. (#1675)
5+
* clarify handle_local_echo. (#1674)
6+
* async_client: add retries/reconnect. (#1672)
7+
* Fix 3.11 problem. (#1673)
8+
* Add new example simulator server/client. (#1671)
9+
* `examples/contrib/explain.py` leveraging Rapid SCADA (#1665)
10+
* _logger missed basicConfig. (#1670)
11+
* Bug fix for #1662 (#1663)
12+
* Bug fix for #1661 (#1664)
13+
* Fix typo in config.rst (#1660)
14+
* test action_increment. (#1659)
15+
* test codeql (#1655)
16+
* mypy complaints. (#1656)
17+
* Remove self.params from async client (#1640)
18+
* Drop test of pypy with python 3.8.
19+
* repair server_async.py (#1644)
20+
* move common framer to base. (#1639)
21+
* Restrict Return diag call to bytes. (#1638)
22+
* use slave= in diag requests. (#1636)
23+
* transport listen in server. (#1628)
24+
* CI test.
25+
* Integrate transport in server. (#1617)
26+
* fix getFrameStart for ExceptionResponse (#1627)
27+
* Add min/min to simulator actions.
28+
* Change to "sync client" in forwarder example (#1625)
29+
* Remove docker (lack of maintenance). (#1623)
30+
* Clean defaults (#1618)
31+
* Reduce CI log with no debug. (#1616)
32+
* prepare server to use transport. (#1607)
33+
* Fix RemoteSlaveContext (#1599)
34+
* Combine stale and lock. (#1608)
35+
* update pytest + extensions. (#1610)
36+
* Change version follow PEP 440. (#1609)
37+
* Fix regression with REPL server not listening (#1604)
38+
* Remove handler= for server classes. (#1602)
39+
* Fix write function codes (#1598)
40+
* transport nullmodem (#1591)
41+
* move test of examples to subdirectory. (#1592)
42+
* transport as object, not base class. (#1572)
43+
* Simple examples. (#1590)
44+
* transport_connect as bool. (#1587)
45+
* Prepare dev (#1588)
46+
* Release corrections. (#1586)
47+
48+
Thanks to:
49+
Alex
50+
Fredo70
51+
Hangyu Fan
52+
James Braza
53+
jan iversen
54+
55+
156
version 3.3.2
257
----------------------------------------------------------
358
* Fix RemoteSlaveContext (#1599)

Dockerfile

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

README.rst

Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Supported versions
2222

2323
Version `2.5.3 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v2.5.3>`_ is the last 2.x release (python >= 2.7, no longer supported).
2424

25-
Version `3.3.2 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.3.2>`_ is the current release (Tested with Python >= 3.8).
25+
Version `3.4.0 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.4.0>`_ is the current release (Tested with Python >= 3.8).
2626

2727
.. important::
2828
All API changes after 3.0.0 are documented in `API_changes.rst <https://github.com/pymodbus-dev/pymodbus/blob/dev/API_changes.rst>`_
@@ -240,88 +240,6 @@ If a maintenance release of an old version is needed (e.g. v2.5.4),
240240
the release tag is used to create a branch with the same name,
241241
and maintenance development is merged here.
242242

243-
-----------------------------------------------------------
244-
Install with Docker
245-
-----------------------------------------------------------
246-
Pull the latest image on ``dev`` branch with ``docker pull ghcr.io/pymodbus-dev/pymodbus:dev``::
247-
248-
❯ docker pull ghcr.io/pymodbus-dev/pymodbus:dev
249-
dev: Pulling from pymodbus-dev/pymodbus
250-
548fcab5fe88: Pull complete
251-
a4d3f9f008ef: Pull complete
252-
eb83acb05730: Pull complete
253-
71cd28d529fd: Pull complete
254-
66607ad8f4f0: Pull complete
255-
64dff4c66d3b: Pull complete
256-
8b26e5718a7a: Pull complete
257-
dc87d8707532: Pull complete
258-
Digest: sha256:cfeee09a87dde5863574779416490fd47cacbb6f37332a3cdaf995c416e16b69
259-
Status: Downloaded newer image for ghcr.io/pymodbus-dev/pymodbus:dev
260-
ghcr.io/pymodbus-dev/pymodbus:dev
261-
262-
The image when run with out any further options supplied will start a repl server in non interactive mode.::
263-
264-
❯ docker run -it --rm -p 8080:8080 -p 5020:5020 ghcr.io/pymodbus-dev/pymodbus:dev
265-
266-
Reactive Modbus Server started.
267-
======== Running on http://127.0.0.1:8080 ========
268-
269-
===========================================================================
270-
Example Usage:
271-
curl -X POST http://127.0.0.1:8080 -d "{"response_type": "error", "error_code": 4}"
272-
===========================================================================
273-
274-
The default command can be overridden by passing any valid command at the end.::
275-
276-
❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "pymodbus.server --help"
277-
278-
Usage: pymodbus.server [OPTIONS] COMMAND [ARGS]...
279-
280-
Reactive Modbus server
281-
282-
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
283-
│ --host TEXT Host address [default: localhost] │
284-
│ --web-port INTEGER Web app port [default: 8080] │
285-
│ -b Support broadcast messages │
286-
│ --repl --no-repl Enable/Disable repl for server [default: repl] │
287-
│ --verbose --no-verbose Run with debug logs enabled for pymodbus [default: no-verbose] │
288-
│ --install-completion Install completion for the current shell. │
289-
│ --show-completion Show completion for the current shell, to copy it or customize the │
290-
│ installation. │
291-
│ --help Show this message and exit. │
292-
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
293-
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
294-
│ run Run Reactive Modbus server. │
295-
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
296-
297-
To check the repl console.::
298-
299-
❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "pymodbus.console --help"
300-
Usage: pymodbus.console [OPTIONS] COMMAND [ARGS]...
301-
302-
Run Main.
303-
304-
Options:
305-
--version Show the version and exit.
306-
--verbose Verbose logs
307-
--broadcast-support Support broadcast messages
308-
--retry-on-empty Retry on empty response
309-
--retry-on-error Retry on error response
310-
--retries INTEGER Retry count
311-
--reset-socket / --no-reset-socket
312-
Reset client socket on error
313-
--help Show this message and exit.
314-
315-
Commands:
316-
serial Define serial communication.
317-
tcp Define TCP.
318-
319-
To run examples (assuming server is running). ::
320-
321-
❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "examples/client_async.py"
322-
14:52:13 INFO client_async:44 ### Create client object
323-
14:52:13 INFO client_async:120 ### Client starting
324-
325243
------------------------------------------------------------
326244
Current Work In Progress
327245
------------------------------------------------------------

0 commit comments

Comments
 (0)