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 c9fcbad

Browse files
Merge branch 'dev'
2 parents 3a48451 + e6061dd commit c9fcbad

Some content is hidden

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

44 files changed

+568
-385
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 21 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ on:
1818
workflow_dispatch:
1919

2020
jobs:
21-
faildraft:
22-
name: fail draft
23-
if: github.event.pull_request.draft == true
24-
runs-on: ubuntu-latest
25-
steps:
26-
- name: fail draft
27-
run: |
28-
exit 1
2921

3022
testing:
3123
name: ${{ matrix.os }} - ${{ matrix.python }}
@@ -36,11 +28,11 @@ jobs:
3628
fail-fast: false
3729
matrix:
3830
os: [ubuntu-latest, macos-latest, windows-latest]
39-
python: ['3.10', '3.11', '3.12', "3.13.0"]
31+
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
4032
include:
4133
- python: '3.10'
4234
run_lint: true
43-
- python: '3.13.0'
35+
- python: '3.13'
4436
run_doc: true
4537
run_lint: true
4638
- os: macos-latest
@@ -54,75 +46,54 @@ jobs:
5446
- name: Checkout repo from github
5547
uses: actions/checkout@v4.2.2
5648

57-
- name: Set up Python ${{ matrix.python }}
58-
uses: actions/setup-python@v5.4.0
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v6
5951
with:
6052
python-version: ${{ matrix.python }}
53+
allow-prereleases: true
54+
enable-cache: true
6155

62-
- name: Set venv path (NON Windows)
63-
if: matrix.os != 'windows-latest'
64-
run: |
65-
echo "VIRTUAL_ENV=${{ github.workspace }}/venv" >> $GITHUB_ENV
66-
echo ${{ github.workspace }}/venv/bin >> $GITHUB_PATH
67-
68-
- name: Set venv path (Windows)
69-
if: matrix.os == 'windows-latest'
70-
run: |
71-
echo "VIRTUAL_ENV=${{ github.workspace }}\\venv" >> $Env:GITHUB_ENV
72-
echo "${{ github.workspace }}\\venv\\Scripts" >> $Env:GITHUB_PATH
73-
74-
- name: Restore base Python virtual environment
75-
id: cache-venv
76-
uses: actions/cache@v4.2.0
77-
with:
78-
path: ${{ env.VIRTUAL_ENV }}
79-
key: >-
80-
${{ runner.os }}-${{ matrix.python }}-venv-${{
81-
hashFiles('pyproject.toml') }}
82-
83-
- name: Create venv (NEW CACHE)
84-
if: steps.cache-venv.outputs.cache-hit != 'true'
56+
- name: Create virtualenv and sync dependencies
8557
run: |
86-
python -m venv ${{ env.VIRTUAL_ENV }}
87-
python -m pip install --upgrade pip
88-
pip install -e ".[all]"
58+
uv sync --all-extras
8959
9060
- name: codespell
9161
if: matrix.run_doc == true
9262
run: |
93-
codespell
63+
uv run codespell
9464
95-
- name: dcoumentation
65+
- name: documentation
9666
if: matrix.run_doc == true
9767
run: |
98-
cd doc; ./build_html
68+
source .venv/bin/activate
69+
cd doc
70+
./build_html
71+
# this won't work on Windows, but we run_doc == False on Windows
9972

10073
- name: pylint
10174
if: matrix.run_lint == true
10275
run: |
103-
pylint --recursive=y examples pymodbus test
76+
uv run pylint --recursive=y examples pymodbus test
10477
10578
- name: mypy
10679
if: matrix.run_lint == true
10780
run: |
108-
mypy pymodbus examples
81+
uv run mypy pymodbus examples
10982
11083
- name: ruff
11184
if: matrix.run_lint == true
11285
run: |
113-
ruff check .
86+
uv run ruff check .
11487
11588
- name: pytest
116-
if: ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.13') }}
89+
if: ${{ (matrix.os != 'ubuntu-latest') || (matrix.python != '3.14.0') }}
11790
run: |
118-
env
119-
pytest
91+
uv run pytest
12092
12193
- name: pytest coverage
122-
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python == '3.13') }}
94+
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python == '3.14.0') }}
12395
run: |
124-
env
125-
pytest --cov
96+
uv run pytest --cov
12697
12798
analyze:
12899
name: Analyze Python
@@ -131,13 +102,9 @@ jobs:
131102
timeout-minutes: 10
132103
steps:
133104
- uses: actions/checkout@v4.2.2
134-
135105
- uses: github/codeql-action/init@v3
136106
with:
137107
languages: python
138-
139-
- uses: github/codeql-action/autobuild@v3
140-
141108
- uses: github/codeql-action/analyze@v3
142109

143110
ci_complete:

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ build/html
2020
venv
2121
downloaded_files/
2222
pymodbus.log
23+
*.lock

‎AUTHORS.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Thanks to
6666
- Jonathan Reichelt Gjertsen
6767
- JorisW
6868
- julian
69+
- Julian Lunz
6970
- Justin Standring
7071
- Kenny Johansson
7172
- Kürşat Aktaş

‎CHANGELOG.rst‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ 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.1
11+
--------------
12+
* Auto debug in case of an error. (#2738)
13+
* Remove duplicate log lines. (#2736)
14+
* Remove unused callback in ServerRequestHandler (#2737)
15+
* test on Python 3.14 (#2735)
16+
* Validate address in all datastores. (#2733)
17+
* Use asyncio.Event to deterministically ensure simulator start (#2734)
18+
* Ignore lockfile (#2730)
19+
* Link api_changes/changelog to README.
20+
* Add note about semver.org.
21+
* Datastore, add typing to set/get. (#2729)
22+
* Move exception codes to constants. (#2728)
23+
* Move ExceptionResponse to proper file. (#2727)
24+
* make base frame signature match subclasses (#2726)
25+
* Switch from venv+pip to uv (#2723)
26+
* Cleanup CI configuration (#2724)
27+
* Simplify code flow for broadcast requests (#2720)
28+
* Fix serial_forwarder.py from examples/contrib (#2715)
29+
* Remove discord. (#2714)
30+
1031
Version 3.11.0
1132
--------------
1233
* Correct bit handling (each byte is LSB->MSB). (#2707)

‎README.rst‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ Upgrade examples:
2727
- 3.8.0 -> 3.9.0: Smaller changes to the pymodbus calls might be needed
2828
- 2.5.4 -> 3.0.0: Major changes in the application might be needed
2929

30-
It is always recommended to read the CHANGELOG as well as the API_changes files.
30+
**REMARK**: As can be seen from the above Pymodbus do NOT follow the semver.org standard.
3131

32-
Current release is `3.11.0 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.11.0>`_.
32+
It is always recommended to read the
33+
`CHANGELOG <https://github.com/pymodbus-dev/pymodbus/blob/dev/CHANGELOG.rst>`_
34+
as well as the
35+
`API_changes <https://github.com/pymodbus-dev/pymodbus/blob/dev/API_changes.rst>`_
36+
files.
37+
38+
Current release is `3.11.1 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.11.1>`_.
3339

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

‎doc/source/_static/examples.tgz‎

32 Bytes
Binary file not shown.

‎doc/source/_static/examples.zip‎

0 Bytes
Binary file not shown.

‎examples/contrib/serial_forwarder.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import signal
1010

1111
from pymodbus.client import ModbusSerialClient
12+
from pymodbus.framer import FramerType
1213
from pymodbus.datastore import ModbusServerContext
1314
from pymodbus.datastore.remote import RemoteDeviceContext
1415
from pymodbus.server import ModbusTcpServer
@@ -33,13 +34,13 @@ def __init__(self):
3334
async def run(self):
3435
"""Run the server"""
3536
port, baudrate, server_port, server_ip, device_ids = get_commandline()
36-
client = ModbusSerialClient(method="rtu", port=port, baudrate=baudrate)
37+
client = ModbusSerialClient(framer=FramerType.RTU, port=port, baudrate=baudrate)
3738
message = f"RTU bus on {port} - baudrate {baudrate}"
3839
_logger.info(message)
3940
store = {}
4041
for i in device_ids:
4142
store[i] = RemoteDeviceContext(client, device_id=i)
42-
context = ModbusServerContext(device_ids=store, single=False)
43+
context = ModbusServerContext(devices=store, single=False)
4344
self.server = ModbusTcpServer(
4445
context,
4546
address=(server_ip, server_port),
@@ -74,7 +75,7 @@ def get_commandline():
7475
parser.add_argument("--server_port", help="server port", default=5020, type=int)
7576
parser.add_argument("--server_ip", help="server IP", default="127.0.0.1", type=str)
7677
parser.add_argument(
77-
"--sdevice_ids", help="list of device_ids to forward", type=int, nargs="+"
78+
"--device_ids", help="list of device_ids to forward", type=int, nargs="+"
7879
)
7980

8081
args = parser.parse_args()

‎examples/package_test_tool.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def callback_data(self, data: bytes, addr: tuple | None = None) -> int:
9090
return len(data)
9191

9292
def callback_connected(self) -> None:
93-
"""Call when connection is succcesfull."""
93+
"""Call when connection is successful."""
9494

9595
def callback_disconnected(self, exc: Exception | None) -> None:
9696
"""Call when connection is lost."""

‎pymodbus/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
from pymodbus.pdu.device import ModbusDeviceIdentification
2121

2222

23-
__version__ = "3.11.0"
23+
__version__ = "3.11.1"
2424
__version_full__ = f"[pymodbus, version {__version__}]"

0 commit comments

Comments
(0)

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