Skip to content

Commit 5115614

Browse files
authored
Remove datastore/database (#1436)
1 parent cb3a41e commit 5115614

File tree

11 files changed

+10
-526
lines changed

11 files changed

+10
-526
lines changed

API_changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Version 3.3.0
77
-------------
88
- Clients have an optional parameter: on_reconnect_callback, Function that will be called just before a reconnection attempt.
99
- general parameter unit= -> slave=
10+
- move SqlSlaveContext, RedisSlaveContext to examples/contrib (due to lack of maintenance)
1011

1112
-------------
1213
Version 3.2.0

README.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Server Features
7070
* TCP, RTU-OVER-TCP, UDP, TLS, Serial ASCII, Serial RTU, and Serial Binary
7171
* asynchronous and synchronous versions
7272
* Full server control context (device information, counters, etc)
73-
* A number of backend contexts (database, redis, sqlite, a slave device) as datastore
73+
* A number of backend contexts as datastore
7474

7575
^^^^^^^^^^^
7676
Use Cases
@@ -179,8 +179,6 @@ Available options are:
179179

180180
- **serial**, installs serial drivers.
181181

182-
- **datastore**, installs databases (SQLAlchemy and Redis) for datastore.
183-
184182
- **documentation**, installs tools to generate documentation.
185183

186184
- **development**, installs development tools needed to enable test/check of pymodbus changes.

doc/source/examples.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,17 @@ Examples contributions
5353
These examples are supplied by users of pymodbus.
5454
The pymodbus team thanks for sharing the examples.
5555

56+
Redis datastore example
57+
^^^^^^^^^^^^^^^^^^^^^^^^
58+
.. literalinclude:: ../../examples/contrib/redis_datastore.py
59+
5660
Serial Forwarder example
5761
^^^^^^^^^^^^^^^^^^^^^^^^
5862
.. literalinclude:: ../../examples/contrib/serial_forwarder.py
5963

64+
Sqlalchemy datastore example
65+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
.. literalinclude:: ../../examples/contrib/sql_datastore.py
6067

6168

6269
Examples version 2.5.3

doc/source/library/datastore.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,3 @@ Datastore classes
2222
.. autoclass:: pymodbus.datastore.ModbusSimulatorContext
2323
:members:
2424
:member-order: bysource
25-
26-
.. autoclass:: pymodbus.datastore.RedisSlaveContext
27-
:members:
28-
:undoc-members:
29-
:show-inheritance:
30-
31-
.. autoclass:: pymodbus.datastore.SqlSlaveContext
32-
:members:
33-
:undoc-members:
34-
:show-inheritance:
File renamed without changes.
File renamed without changes.

examples/v2.5.3/modbus_scraper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def __init__(self, factory, *args, **kwargs):
193193
# An example line reader, this can replace with:
194194
# - the TCP protocol
195195
# - a context recorder
196-
# - a database or file recorder
196+
# - a any recorder
197197
# --------------------------------------------------------------------------- #
198198
class LoggingContextReader:
199199
"""Logging context reader."""

pymodbus/datastore/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
ModbusServerContext,
55
ModbusSlaveContext,
66
)
7-
from pymodbus.datastore.database.redis_datastore import RedisSlaveContext
8-
from pymodbus.datastore.database.sql_datastore import SqlSlaveContext
97
from pymodbus.datastore.simulator import ModbusSimulatorContext
108
from pymodbus.datastore.store import (
119
ModbusSequentialDataBlock,
@@ -23,6 +21,4 @@
2321
"ModbusSlaveContext",
2422
"ModbusServerContext",
2523
"ModbusSimulatorContext",
26-
"RedisSlaveContext",
27-
"SqlSlaveContext",
2824
]

pymodbus/datastore/database/__init__.py

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

requirements.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ click>=8.0.0
3333
# install:serial
3434
pyserial>=3.5
3535

36-
# install:datastore
37-
redis>=2.10.6
38-
sqlalchemy>=1.1.15
39-
4036

4137
# -------------------------------------------------------------------
4238
# documentation, everything needed to generate documentation.
@@ -69,6 +65,5 @@ pytest-asyncio==0.20.3
6965
pytest-cov==4.0.0
7066
pytest-timeout==2.1.0
7167
pytest-xdist==3.1.0
72-
types-redis
7368
types-Pygments
7469
types-pyserial

0 commit comments

Comments
 (0)