Skip to content

Commit ce5d83b

Browse files
authored
Merge pull request #611 from riptideio/dev
pymodbus 2.5.0
2 parents ff03488 + 4b57def commit ce5d83b

Some content is hidden

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

74 files changed

+2618
-425
lines changed

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
omit =
33
pymodbus/repl/*
44
pymodbus/internal/*
5-
pymodbus/server/asyncio.py
5+
pymodbus/server/asyncio.py
6+
pymodbus/server/reactive/*

.github/workflows/ci.yml

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- master
8+
tags:
9+
- v*
10+
pull_request:
11+
branches:
12+
- "*"
13+
schedule:
14+
# Daily at 05:14
15+
- cron: '14 5 * * *'
16+
17+
jobs:
18+
test:
19+
# Should match JOB_NAME below
20+
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
21+
runs-on: ${{ matrix.os.runs-on }}
22+
container: ${{ matrix.os.container[matrix.python.docker] }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
task:
27+
- name: Test
28+
tox: test
29+
coverage: true
30+
os:
31+
- name: Linux
32+
runs-on: ubuntu-latest
33+
python_platform: linux
34+
matrix: linux
35+
container:
36+
2.7: docker://python:2.7-buster
37+
3.6: docker://python:3.6-buster
38+
3.7: docker://python:3.7-buster
39+
3.8: docker://python:3.8-buster
40+
3.9: docker://python:3.9-buster
41+
pypy2: docker://pypy:2-jessie
42+
pypy3: docker://pypy:3-stretch
43+
# - name: Windows
44+
# runs-on: windows-latest
45+
# python_platform: win32
46+
# matrix: windows
47+
# - name: macOS
48+
# runs-on: macos-latest
49+
# python_platform: darwin
50+
# matrix: macos
51+
python:
52+
- name: CPython 2.7
53+
tox: py27
54+
action: 2.7
55+
docker: 2.7
56+
implementation: cpython
57+
- name: PyPy 2.7
58+
tox: pypy27
59+
action: pypy-2.7
60+
docker: pypy2.7
61+
implementation: pypy
62+
- name: CPython 3.6
63+
tox: py36
64+
action: 3.6
65+
docker: 3.6
66+
implementation: cpython
67+
- name: CPython 3.7
68+
tox: py37
69+
action: 3.7
70+
docker: 3.7
71+
implementation: cpython
72+
- name: CPython 3.8
73+
tox: py38
74+
action: 3.8
75+
docker: 3.8
76+
implementation: cpython
77+
- name: CPython 3.9
78+
tox: py39
79+
action: 3.9
80+
docker: 3.9
81+
implementation: cpython
82+
- name: PyPy 3.6
83+
tox: pypy36
84+
action: pypy-3.6
85+
docker: pypy3.6
86+
implementation: pypy
87+
- name: PyPy 3.7
88+
tox: pypy37
89+
action: pypy-3.7
90+
docker: pypy3.7
91+
implementation: pypy
92+
arch:
93+
- name: x86
94+
action: x86
95+
matrix: x86
96+
- name: x64
97+
action: x64
98+
matrix: x64
99+
exclude:
100+
- os:
101+
matrix: linux
102+
arch:
103+
matrix: x86
104+
- os:
105+
matrix: macos
106+
arch:
107+
matrix: x86
108+
env:
109+
# Should match name above
110+
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
111+
steps:
112+
- uses: actions/checkout@v2
113+
with:
114+
fetch-depth: 0
115+
- name: Set up ${{ matrix.python.name }} (if CPython)
116+
if: ${{ job.container == '' && matrix.python.implementation == 'cpython'}}
117+
uses: actions/setup-python@v2
118+
with:
119+
python-version: '${{ matrix.python.action }}.0-alpha - ${{ matrix.python.action }}.X'
120+
architecture: '${{ matrix.arch.action }}'
121+
- name: Set up ${{ matrix.python.name }} (if PyPy)
122+
if: ${{ job.container == '' && matrix.python.implementation == 'pypy'}}
123+
uses: actions/setup-python@v2
124+
with:
125+
python-version: '${{ matrix.python.action }}'
126+
architecture: '${{ matrix.arch.action }}'
127+
- name: Install
128+
run: |
129+
pip install --upgrade pip setuptools wheel
130+
pip install --upgrade tox
131+
- uses: twisted/[email protected]
132+
- name: Test
133+
run: |
134+
tox -vv -e ${{ matrix.python.tox }}
135+
- name: Coverage Processing
136+
if: matrix.task.coverage
137+
run: |
138+
mkdir coverage_reports
139+
cp .coverage "coverage_reports/.coverage.${{ env.JOB_NAME }}"
140+
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_NAME }}.xml"
141+
- name: Upload Coverage
142+
if: matrix.task.coverage
143+
uses: actions/upload-artifact@v2
144+
with:
145+
name: coverage
146+
path: coverage_reports/*
147+
check:
148+
# Should match JOB_NAME below
149+
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
150+
runs-on: ${{ matrix.os.runs-on }}
151+
container: ${{ matrix.os.container[matrix.python.docker] }}
152+
strategy:
153+
fail-fast: false
154+
matrix:
155+
task:
156+
- name: flake8
157+
tox: flake8
158+
continue_on_error: true
159+
- name: Docs
160+
tox: docs
161+
os:
162+
- name: Linux
163+
runs-on: ubuntu-latest
164+
python_platform: linux
165+
matrix: linux
166+
container:
167+
3.8: docker://python:3.8-buster
168+
python:
169+
- name: CPython 3.8
170+
tox: py38
171+
action: 3.8
172+
docker: 3.8
173+
implementation: cpython
174+
arch:
175+
- name: x64
176+
action: x64
177+
matrix: x64
178+
env:
179+
# Should match name above
180+
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
181+
steps:
182+
- uses: actions/checkout@v2
183+
with:
184+
fetch-depth: 0
185+
- name: Install
186+
run: |
187+
pip install --upgrade pip setuptools wheel
188+
pip install --upgrade tox
189+
- uses: twisted/[email protected]
190+
- name: Test
191+
continue-on-error: ${{ matrix.task.continue_on_error == true }}
192+
run: |
193+
tox -vv -e ${{ matrix.task.tox }}
194+
coverage:
195+
# Should match JOB_NAME below
196+
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
197+
runs-on: ${{ matrix.os.runs-on }}
198+
needs:
199+
- test
200+
container: ${{ matrix.os.container[matrix.python.docker] }}
201+
strategy:
202+
fail-fast: false
203+
matrix:
204+
task:
205+
- name: Coverage
206+
tox: combined-coverage
207+
download_coverage: true
208+
os:
209+
- name: Linux
210+
runs-on: ubuntu-latest
211+
python_platform: linux
212+
matrix: linux
213+
container:
214+
3.8: docker://python:3.8-buster
215+
python:
216+
- name: CPython 3.8
217+
tox: py38
218+
action: 3.8
219+
docker: 3.8
220+
implementation: cpython
221+
arch:
222+
- name: x64
223+
action: x64
224+
matrix: x64
225+
env:
226+
# Should match name above
227+
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
228+
steps:
229+
- uses: actions/checkout@v2
230+
with:
231+
fetch-depth: 0
232+
- name: Install
233+
run: |
234+
pip install --upgrade pip setuptools wheel
235+
pip install --upgrade tox
236+
pip install --upgrade six
237+
- uses: twisted/[email protected]
238+
- name: Download Coverage
239+
if: matrix.task.download_coverage
240+
uses: actions/download-artifact@v2
241+
with:
242+
name: coverage
243+
path: coverage_reports
244+
- name: Test
245+
continue-on-error: ${{ matrix.task.continue_on_error == true }}
246+
run: |
247+
tox -vv -e ${{ matrix.task.tox }}
248+
all:
249+
name: All
250+
runs-on: ubuntu-latest
251+
needs:
252+
- check
253+
- coverage
254+
- test
255+
steps:
256+
- name: This
257+
shell: python
258+
run: |
259+
import this

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ test/__pycache__/
3737
/doc/_build/
3838
.pytest_cache/
3939
**/.pymodhis
40+
/build/
41+
/dist/

.travis.yml

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

CHANGELOG.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
version 2.5.0
2+
----------------------------------------------------------
3+
* Support response types `stray` and `empty` in repl server.
4+
* Minor updates in asyncio server.
5+
* Update reactive server to send stray response of given length.
6+
* Transaction manager updates on retries for empty and invalid packets.
7+
* Test fixes for asyncio client and transaction manager.
8+
* Fix sync client and processing of incomplete frames with rtu framers
9+
* Support synchronous diagnostic client (TCP)
10+
* Server updates (REPL and async)
11+
* Handle Memory leak in sync servers due to socketserver memory leak
12+
13+
version 2.5.0rc3
14+
----------------------------------------------------------
15+
* Minor fix in documentations
16+
* Travis fix for Mac OSX
17+
* Disable unnecessary deprecation warning while using async clients.
18+
* Use Github actions for builds in favor of travis.
19+
20+
21+
version 2.5.0rc2
22+
----------------------------------------------------------
23+
* Documentation updates
24+
* Disable `strict` mode by default.
25+
* Fix `ReportSlaveIdRequest` request
26+
* Sparse datablock initialization updates.
27+
28+
version 2.5.0rc1
29+
----------------------------------------------------------
30+
* Support REPL for modbus server (only python3 and asyncio)
31+
* Fix REPL client for write requests
32+
* Fix examples
33+
* Asyncio server
34+
* Asynchronous server (with custom datablock)
35+
* Fix version info for servers
36+
* Fix and enhancements to Tornado clients (seril and tcp)
37+
* Fix and enhancements to Asyncio client and server
38+
* Update Install instructions
39+
* Synchronous client retry on empty and error enhancments
40+
* Add new modbus state `RETRYING`
41+
* Support runtime response manipulations for Servers
42+
* Bug fixes with logging module in servers
43+
* Asyncio modbus serial server support
144

245
Version 2.4.0
346
----------------------------------------------------------

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,20 @@ check: install
4242
test: install
4343
@pip install --upgrade --quiet --requirement=requirements-tests.txt
4444
ifeq ($(PYVER),3.6)
45+
$(info Running tests on $(PYVER))
46+
@pip install --upgrade pip --quiet
4547
@pytest --cov=pymodbus/ --cov-report term-missing test/test_server_asyncio.py test
48+
@coverage report --fail-under=85 -i
49+
else ifeq ($(PYVER),2.7)
50+
$(info Running tests on $(PYVER))
51+
@pip install pip==20.3.4 --quiet
52+
@pytest --cov-config=.coveragerc --cov=pymodbus/ --cov-report term-missing --ignore test/test_server_asyncio.py --ignore test/test_client_async_asyncio.py test
4653
@coverage report --fail-under=90 -i
4754
else
48-
@pytest --cov=pymodbus/ --cov-report term-missing
49-
@coverage report --fail-under=90 -i
55+
$(info Running tests on $(PYVER))
56+
@pip install --upgrade pip --quiet
57+
@pytest --cov=pymodbus/ --cov-report term-missing test
58+
@coverage report --fail-under=85 -i
5059
endif
5160

5261
tox: install

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PyModbus - A Python Modbus Stack
77
.. image:: https://badges.gitter.im/Join%20Chat.svg
88
:target: https://gitter.im/pymodbus_dev/Lobby
99
.. image:: https://readthedocs.org/projects/pymodbus/badge/?version=latest
10-
:target: http://pymodbus.readthedocs.io/en/async/?badge=latest
10+
:target: http://pymodbus.readthedocs.io/en/latest/?badge=latest
1111
:alt: Documentation Status
1212
.. image:: http://pepy.tech/badge/pymodbus
1313
:target: http://pepy.tech/project/pymodbus

0 commit comments

Comments
 (0)