From 44bdfd09b3b23d4c68556b2cebeb5eaac5bf65fc Mon Sep 17 00:00:00 2001 From: Stephen Arnold Date: Sat, 26 Oct 2024 16:58:32 -0700 Subject: [PATCH] chg: dev: minimum py version is now 3.8 so remove fallback import * also make the readme intro a bit more clear Signed-off-by: Stephen Arnold --- README.rst | 30 +++++++++++++++--------------- redis_ipc.py | 12 ++++-------- setup.cfg | 2 +- 3 files changed, 20 insertions(+), 24 deletions(-) diff --git a/README.rst b/README.rst index 3214e1d..c7b87c3 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -=============================== - Python bindings for redis-ipc -=============================== +==================================== + Python implementation of redis-ipc +==================================== A small python module implementing redis-ipc concepts. @@ -10,25 +10,25 @@ A small python module implementing redis-ipc concepts. |python| |tag| |license| |style| -redis-ipc is an example of how redis_ can be used as an advanced IPC -mechanism on an embedded Linux system, for instance as a substitute for the -more common choice of dbus. +redis-ipc (the concept) comes in 2 flavors, a python module (this repo) +and a lightweight C library implementation. See the (original) +`redis-ipc C library`_ repo for a more detailed description. -redis-ipc is intended to make communication among different logical components -of a system convenient. It is not intended to replace shared memory for high -data-rate transfers between processes, where lowest possible overhead is key, -but to provide a convenient and reliable way to implement the following -IPC mechanisms: +``redis_ipc`` (the Python module) is an example of how redis_ can be used +as an advanced IPC mechanism on an embedded Linux system, for instance +as a substitute for the more common choice of dbus. + +``redis_ipc`` is intended to make communication among different logical +components of a system convenient. It is not intended to replace shared +memory for high data-rate transfers between processes, where lowest +possible overhead is key, but to provide a convenient and reliable way +to implement the following IPC mechanisms: * command queues * settings * status * event channels -redis-ipc comes in 2 flavors, a python module (this repo) and a lightweight -C library implementation. See the (original) `redis-ipc C library`_ repo for -a more detailed description. - .. _redis-ipc C library: https://github.com/VCTLabs/redis-ipc diff --git a/redis_ipc.py b/redis_ipc.py index d7751ec..2aa45d4 100644 --- a/redis_ipc.py +++ b/redis_ipc.py @@ -9,25 +9,21 @@ import json import os -import sys import tempfile import time +from importlib.metadata import version from pathlib import Path import redis from redis import ConnectionPool, StrictRedis -if sys.version_info < (3, 8): - from importlib_metadata import version -else: - from importlib.metadata import version - -__version__ = version('redis_ipc') - # instead of global pdb import, add this where you want to start debugger: # import pdb; pdb.set_trace() +__version__ = version('redis_ipc') + + # exceptions class RedisIpcExc(Exception): """ diff --git a/setup.cfg b/setup.cfg index bc4276e..50c5412 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,7 @@ classifiers = Topic :: Software Development :: Testing [options] -python_requires = >=3.6 +python_requires = >=3.8 zip_safe = True py_modules =