Skip to content

Commit 7dfac6f

Browse files
author
fbeitler
committed
Fix smaller errors
Remove Python2 from checks, CI stuff and more
1 parent 7ba6a49 commit 7dfac6f

File tree

20 files changed

+75
-240
lines changed

20 files changed

+75
-240
lines changed

.github/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
python-version: '3.x'
1616
- name: Install dependencies
1717
run: |
18-
python -m pip install --upgrade pip
18+
python3 -m pip install --upgrade pip
1919
pip install setuptools wheel twine
2020
- name: Build and publish
2121
env:
2222
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
2323
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
2424
run: |
25-
python setup.py sdist bdist_wheel
25+
python3 setup.py sdist bdist_wheel
2626
twine upload dist/*

.github/workflows/ci.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
runs-on: ubuntu-latest
3535
matrix: linux
3636
container:
37-
2.7: docker://python:2.7-buster
38-
3.6: docker://python:3.6-buster
3937
3.7: docker://python:3.7-buster
4038
3.8: docker://python:3.8-buster
4139
3.9: docker://python:3.9-buster
@@ -51,25 +49,6 @@ jobs:
5149
x86: win32
5250
x64: win64
5351
python:
54-
- name: CPython 2.7
55-
tox: py27
56-
action: 2.7
57-
docker: 2.7
58-
matrix: 2.7
59-
implementation: cpython
60-
- name: PyPy 2.7
61-
tox: pypy27
62-
action: pypy-2.7
63-
docker: pypy2.7
64-
matrix: 2.7
65-
implementation: pypy
66-
openssl_msvc_version: 2019
67-
- name: CPython 3.6
68-
tox: py36
69-
action: 3.6
70-
docker: 3.6
71-
matrix: 3.6
72-
implementation: cpython
7352
- name: CPython 3.7
7453
tox: py37
7554
action: 3.7
@@ -88,13 +67,6 @@ jobs:
8867
docker: 3.9
8968
matrix: 3.9
9069
implementation: cpython
91-
- name: PyPy 3.6
92-
tox: pypy36
93-
action: pypy-3.6
94-
docker: pypy3.6
95-
matrix: 3.6
96-
implementation: pypy
97-
openssl_msvc_version: 2019
9870
- name: PyPy 3.7
9971
tox: pypy37
10072
action: pypy-3.7

Makefile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,12 @@ check: install
4141

4242
test: install
4343
@pip install --upgrade --quiet --requirement=requirements-tests.txt
44-
ifeq ($(PYVER),3.6)
45-
$(info Running tests on $(PYVER))
46-
@pip install --upgrade pip --quiet
47-
@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
53-
@coverage report --fail-under=90 -i
54-
else
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
59-
endif
44+
45+
$(info Running tests on $(PYVER))
46+
@pip install --upgrade pip --quiet
47+
@pytest --cov=pymodbus/ --cov-report term-missing test
48+
@coverage report --fail-under=85 -i
49+
6050

6151
tox: install
6252
@pip install --upgrade --quiet tox && tox

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Summary
2323
Pymodbus is a full Modbus protocol implementation using twisted/torndo/asyncio for its
2424
asynchronous communications core. It can also be used without any third
2525
party dependencies (aside from pyserial) if a more lightweight project is
26-
needed. Furthermore, it should work fine under any python version > 2.7
26+
needed. Furthermore, it should work fine under any python version >= 3.7
2727
(including python 3+)
2828

2929

doc/INSTALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Requirements
22
-------------
33

4-
* Python 2.7 or later.
4+
* Python 3.7 or later.
55
* Python Twisted, Tornado or asyncio (For async client and server)
66
* Pyserial
77

examples/common/custom_message.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
The following is an example of how to use the synchronous modbus client
77
implementation from pymodbus.
88
9-
It should be noted that the client can also be used with
10-
the guard construct that is available in python 2.5 and up::
11-
129
with ModbusClient('127.0.0.1') as client:
1310
result = client.read_coils(1,10)
1411
print result

examples/common/custom_message_async_clients.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
The following is an example of how to use the synchronous modbus client
77
implementation from pymodbus.
88
9-
It should be noted that the client can also be used with
10-
the guard construct that is available in python 2.5 and up::
11-
129
with ModbusClient('127.0.0.1') as client:
1310
result = client.read_coils(1,10)
1411
print result

examples/common/synchronous_client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
The following is an example of how to use the synchronous modbus client
77
implementation from pymodbus.
88
9-
It should be noted that the client can also be used with
10-
the guard construct that is available in python 2.5 and up::
11-
129
with ModbusClient('127.0.0.1') as client:
1310
result = client.read_coils(1,10)
1411
print result

examples/twisted/modbus_tcp.tac

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ from twisted.python.logfile import DailyLogFile
1010
from pymodbus.constants import Defaults
1111
from pymodbus.server.async import ModbusServerFactory
1212
from pymodbus.transaction import ModbusSocketFramer
13-
from pymodbus.internal.ptwisted import InstallManagementConsole
1413

1514
def BuildService():
1615
"""
@@ -19,7 +18,6 @@ def BuildService():
1918
context = None
2019
framer = ModbusSocketFramer
2120
factory = ModbusServerFactory(context, framer)
22-
InstallManagementConsole({ 'server' : factory })
2321
application = internet.TCPServer(Defaults.Port, factory)
2422
return application
2523

examples/twisted/modbus_udp.tac

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ from twisted.python.logfile import DailyLogFile
1010
from pymodbus.constants import Defaults
1111
from pymodbus.server.async import ModbusUdpProtocol
1212
from pymodbus.transaction import ModbusSocketFramer
13-
from pymodbus.internal.ptwisted import InstallManagementConsole
1413

1514
def BuildService():
1615
"""
@@ -19,7 +18,6 @@ def BuildService():
1918
context = None
2019
framer = ModbusSocketFramer
2120
server = ModbusUdpProtocol(context, framer)
22-
InstallManagementConsole({ 'server' : server })
2321
application = internet.UDPServer(Defaults.Port, server)
2422
return application
2523

0 commit comments

Comments
 (0)