Skip to content

Commit 2071307

Browse files
committed
Merge branch 'dev'
2 parents 779967e + 1629f05 commit 2071307

Some content is hidden

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

42 files changed

+521
-1584
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repo from github
43-
uses: actions/checkout@v4.1.0
43+
uses: actions/checkout@v4.1.1
4444

4545
- name: Set up Python ${{ matrix.python }}
46-
uses: actions/setup-python@v4.7.1
46+
uses: actions/setup-python@v5.0.0
4747
with:
4848
python-version: ${{ matrix.python }}
4949

@@ -61,7 +61,7 @@ jobs:
6161
6262
- name: Restore base Python virtual environment
6363
id: cache-venv
64-
uses: actions/cache@v3.3.2
64+
uses: actions/cache@v4.0.1
6565
with:
6666
path: ${{ env.VIRTUAL_ENV }}
6767
key: >-
@@ -117,15 +117,15 @@ jobs:
117117
runs-on: ubuntu-22.04
118118
timeout-minutes: 10
119119
steps:
120-
- uses: actions/checkout@v3
120+
- uses: actions/checkout@v4.1.1
121121

122-
- uses: github/codeql-action/init@v2
122+
- uses: github/codeql-action/init@v3
123123
with:
124124
languages: python
125125

126-
- uses: github/codeql-action/autobuild@v2
126+
- uses: github/codeql-action/autobuild@v3
127127

128-
- uses: github/codeql-action/analyze@v2
128+
- uses: github/codeql-action/analyze@v3
129129

130130
ci_complete:
131131
name: ci_complete

AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Thanks to
2020
- André Srinivasan
2121
- banana-sun
2222
- Blaise Thompson
23+
- CapraTheBest
2324
- cgernert
2425
- corollaries
2526
- Chandler Riehm
@@ -46,6 +47,7 @@ Thanks to
4647
- Joe Burmeister
4748
- Jonathan Reichelt Gjertsen
4849
- julian
50+
- Justin Standring
4951
- Kenny Johansson
5052
- Matthias Straka
5153
- laund

CHANGELOG.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ 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.6.6
11+
-------------
12+
* Solve transport close() as not inherited method. (#2098)
13+
* enable `mypy --check-untyped-defs` (#2096)
14+
* Add get_expected_response_length to transaction.
15+
* Remove control encode in framersRemove control encode in framers. (#2095)
16+
* Bump codeql in CI to v3. (#2093)
17+
* Improve server types (#2092)
18+
* Remove pointless try/except (#2091)
19+
* Improve transport types (#2090)
20+
* Use explicit ValueError when called with incorrect function code (#2089)
21+
* update message tests (incorporate all old tests). (#2088)
22+
* Improve simulator type hints (#2084)
23+
* Cleanup dead resetFrame code (#2082)
24+
* integrate message.encode() into framer.buildPacket. (#2062)
25+
* Repair client close() (intern= is needed for ModbusProtocol). (#2080)
26+
* Updated Message_Parser example (#2079)
27+
* Fix #2069 use released repl from pypi (#2077)
28+
* Fix field encoding of Read File Record Response (#2075)
29+
* Improve simulator types (#2076)
30+
* Bump actions. (#2071)
31+
32+
1033
Version 3.6.5
1134
-------------
1235
* Update framers to ease message integration (only decode/encode) (#2064)

MAKE_RELEASE.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ Prepare/make release on dev.
1414
* Control / Update API_changes.rst
1515
* Update CHANGELOG.rst
1616
* Add commits from last release, but selectively !
17-
git log --oneline v3.6.5..HEAD > commit.log
18-
git log --pretty="%an" v3.6.1..HEAD | sort -uf > authors.log
19-
update AUTHORS
17+
git log --oneline v3.6.6..HEAD > commit.log
18+
git log --pretty="%an" v3.6.6..HEAD | sort -uf > authors.log
19+
update AUTHORS.rst and CHANGELOG.rst
2020
cd doc; ./build_html
2121
* rm -rf build/* dist/*
22+
* git checkout build
2223
* python3 -m build
2324
* twine check dist/*
2425
* Commit, push and merge.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ 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.5 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.6.5>`_.
14+
Current release is `3.6.6 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.6.6>`_.
1515

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

doc/source/_static/examples.tgz

5.55 KB
Binary file not shown.

doc/source/_static/examples.zip

-10 Bytes
Binary file not shown.

examples/message_parser.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import logging
1212
import textwrap
1313

14+
from pymodbus import pymodbus_apply_logging_config
1415
from pymodbus.factory import ClientDecoder, ServerDecoder
1516
from pymodbus.transaction import (
1617
ModbusAsciiFramer,
@@ -80,15 +81,10 @@ def decode(self, message):
8081
print(f"{decoder.decoder.__class__.__name__}")
8182
print("-" * 80)
8283
try:
83-
decoder.addToFrame(message)
84-
if decoder.checkFrame():
85-
slave = decoder._header.get( # pylint: disable=protected-access
86-
"uid", 0x00
87-
)
88-
decoder.advanceFrame()
89-
decoder.processIncomingPacket(message, self.report, slave)
90-
else:
91-
self.check_errors(decoder, message)
84+
slave = decoder._header.get( # pylint: disable=protected-access
85+
"uid", 0x00
86+
)
87+
decoder.processIncomingPacket(message, self.report, slave)
9288
except Exception: # pylint: disable=broad-except
9389
self.check_errors(decoder, message)
9490

@@ -144,6 +140,7 @@ def report(self, message):
144140
def parse_messages(cmdline=None):
145141
"""Do a helper method to generate the messages to parse."""
146142
args = get_commandline(cmdline=cmdline)
143+
pymodbus_apply_logging_config(args.log.upper())
147144
_logger.setLevel(args.log.upper())
148145
if not args.message:
149146
_logger.error("Missing --message.")

pymodbus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
from pymodbus.pdu import ExceptionResponse
1919

2020

21-
__version__ = "3.6.5"
21+
__version__ = "3.6.6"
2222
__version_full__ = f"[pymodbus, version {__version__}]"

pymodbus/client/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def register(self, custom_response_class: ModbusResponse) -> None:
124124
"""
125125
self.framer.decoder.register(custom_response_class)
126126

127-
def close(self, reconnect: bool = False) -> None: # type: ignore[override] # pylint: disable=arguments-differ
127+
def close(self, reconnect: bool = False) -> None:
128128
"""Close connection."""
129129
if reconnect:
130130
self.connection_lost(asyncio.TimeoutError("Server not responding"))

0 commit comments

Comments
 (0)