Skip to content

Commit dde911e

Browse files
authored
Merge pull request #15 from aosingh/dev/1.2.0
dev/1.2.0
2 parents 55b1915 + 523803f commit dde911e

8 files changed

Lines changed: 51 additions & 51 deletions

File tree

.github/workflows/sqlite_build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
12-
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
11+
os: [macos-latest, windows-latest, ubuntu-latest]
12+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8', 'pypy-3.9']
1313

1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Setup Python ${{ matrix.python-version }}
1919
uses: actions/setup-python@v4

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
[![PyPI version](https://badge.fury.io/py/sqlite-rx.svg)](https://pypi.python.org/pypi/sqlite-rx) [![sqlite-rx](https://github.com/aosingh/sqlite_rx/actions/workflows/sqlite_build.yaml/badge.svg)](https://github.com/aosingh/sqlite_rx/actions) [![Downloads](https://pepy.tech/badge/sqlite-rx)](https://pepy.tech/project/sqlite-rx)
33

44

5-
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
65
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
76
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)]((https://www.python.org/downloads/release/python-390/))
87
[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/)
9-
[![PyPy3.7](https://img.shields.io/badge/python-PyPy3.7-blue.svg)](https://www.pypy.org/download.html)
8+
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
9+
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)
10+
11+
1012
[![PyPy3.8](https://img.shields.io/badge/python-PyPy3.8-blue.svg)](https://www.pypy.org/download.html)
1113
[![PyPy3.9](https://img.shields.io/badge/python-PyPy3.9-blue.svg)](https://www.pypy.org/download.html)
1214

1315

14-
#### Official Documentation -> [https://aosingh.github.io/sqlite_rx/](https://aosingh.github.io/sqlite_rx/)
16+
#### For documentation, usage and examples refer [https://aosingh.github.io/sqlite_rx/](https://aosingh.github.io/sqlite_rx/)
1517

1618
# Introduction
1719

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
billiard==4.0.2
2-
click==8.1.3
3-
msgpack==1.0.4
4-
pyzmq==23.2.0
5-
tornado==6.2
1+
billiard==4.2.0
2+
click==8.1.7
3+
msgpack==1.0.7
4+
pyzmq==25.1.1
5+
tornado==6.3.3

requirements_dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
coverage==6.3.2
1+
coverage==7.3.2
22
pip
3-
pytest==7.1.1
3+
pytest==7.4.3
44
setuptools
55
twine

setup.cfg

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = sqlite_rx
3-
version = 1.1.2
3+
version = 1.2.0
44
description = Python SQLite Client and Server
55
long_description = file: README.md
66
long_description_content_type = text/markdown
@@ -16,9 +16,11 @@ classifiers =
1616
Intended Audience :: System Administrators
1717
License :: OSI Approved :: MIT License
1818
Programming Language :: Python :: 3 :: Only
19-
Programming Language :: Python :: 3.7
2019
Programming Language :: Python :: 3.8
2120
Programming Language :: Python :: 3.9
21+
Programming Language :: Python :: 3.10
22+
Programming Language :: Python :: 3.11
23+
Programming Language :: Python :: 3.12
2224
Operating System :: POSIX :: Linux
2325
Operating System :: Unix
2426
Operating System :: Microsoft :: Windows
@@ -45,14 +47,14 @@ include_package_data = True
4547
scripts =
4648
bin/curve-keygen
4749
install_requires =
48-
billiard==4.0.2
49-
msgpack==1.0.4
50-
pyzmq==23.2.0
51-
tornado==6.2
50+
billiard==4.2.0
51+
msgpack==1.0.7
52+
pyzmq==25.1.1
53+
tornado==6.3.3
5254
test_require =
53-
pytest==7.1.1
54-
coverage==6.3.2
55-
python_requires = >=3.7
55+
pytest==7.4.3
56+
coverage==7.3.2
57+
python_requires = >=3.8
5658

5759
[options.packages.find]
5860
where = sqlite_rx

setup.py

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1+
import sys
12
from os import path
23

34
from setuptools import find_packages, setup
45

56

7+
if sys.version_info < (3, 8):
8+
print("Error: sqlite-rx does not support this version of Python.")
9+
print("Please upgrade to Python 3.8 or higher.")
10+
sys.exit(1)
11+
612
this_directory = path.abspath(path.dirname(__file__))
713

814
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
915
long_description = f.read()
1016

11-
VERSION = '1.1.2'
17+
VERSION = '1.2.0'
1218
DISTNAME = 'sqlite_rx'
1319
LICENSE = 'MIT License'
1420
AUTHOR = 'Abhishek Singh'
@@ -19,15 +25,15 @@
1925

2026
PACKAGES = ['sqlite_rx']
2127

22-
INSTALL_REQUIRES = ['msgpack==1.0.4',
23-
'pyzmq==23.2.0',
24-
'tornado==6.2',
25-
'billiard==4.0.2']
28+
INSTALL_REQUIRES = ['msgpack==1.0.7',
29+
'pyzmq==25.1.1',
30+
'tornado==6.3.3',
31+
'billiard==4.2.0']
2632

27-
CLI_REQUIRES = ['click==8.1.3', 'rich==12.0.1', 'pygments==2.11.2']
33+
CLI_REQUIRES = ['click==8.1.7', 'rich==13.6.0', 'pygments==2.16.1']
2834

29-
TEST_REQUIRE = ['pytest==7.1.1',
30-
'coverage==6.3.2']
35+
TEST_REQUIRE = ['pytest==7.4.3',
36+
'coverage==7.3.2']
3137

3238
classifiers = [
3339
'Topic :: Database :: Database Engines/Servers',
@@ -38,18 +44,19 @@
3844
'Intended Audience :: System Administrators',
3945
'License :: OSI Approved :: MIT License',
4046
'Programming Language :: Python :: 3 :: Only',
41-
'Programming Language :: Python :: 3.7',
4247
'Programming Language :: Python :: 3.8',
4348
'Programming Language :: Python :: 3.9',
4449
'Programming Language :: Python :: 3.10',
50+
'Programming Language :: Python :: 3.11',
51+
'Programming Language :: Python :: 3.12',
4552
'Operating System :: POSIX :: Linux',
4653
'Operating System :: Unix',
4754
'Operating System :: Microsoft :: Windows',
4855
'Operating System :: MacOS'
4956
]
5057
keywords = 'sqlite client server fast secure'
5158

52-
project_urls = {"Documentation" : "https://aosingh.github.io/sqlite_rx/",
59+
project_urls = {"Documentation": "https://aosingh.github.io/sqlite_rx/",
5360
"Source": "https://github.com/aosingh/sqlite_rx",
5461
"Bug Tracker": "https://github.com/aosingh/sqlite_rx/issues",
5562
"CI": "https://github.com/aosingh/sqlite_rx/actions",
@@ -87,5 +94,5 @@
8794
include_package_data=True,
8895
classifiers=classifiers,
8996
keywords=keywords,
90-
python_requires='>=3.7'
97+
python_requires='>=3.8'
9198
)

sqlite_rx/backup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111

1212
def is_backup_supported():
13-
if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
14-
return False
1513

1614
if sys.platform.startswith('win'):
1715
return False

sqlite_rx/server.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
import zmq
1616
from sqlite_rx import get_version
1717
from sqlite_rx.auth import Authorizer, KeyMonkey
18-
from sqlite_rx.backup import SQLiteBackUp, RecurringTimer
18+
from sqlite_rx.backup import SQLiteBackUp, RecurringTimer, is_backup_supported
1919
from sqlite_rx.exception import SQLiteRxBackUpError
2020
from sqlite_rx.exception import SQLiteRxZAPSetupError
2121
from tornado import ioloop, version
22-
from zmq.auth.ioloop import IOLoopAuthenticator
22+
from zmq.auth.asyncio import AsyncioAuthenticator
2323
from zmq.eventloop import zmqstream
2424

2525

@@ -93,7 +93,7 @@ def stream(self,
9393
if not use_encryption:
9494
raise SQLiteRxZAPSetupError("ZAP requires CurveZMQ(use_encryption = True) to be enabled. Exiting")
9595

96-
self.auth = IOLoopAuthenticator(self.context)
96+
self.auth = AsyncioAuthenticator(self.context)
9797
LOG.info("ZAP enabled. \n Authorizing clients in %s.", keymonkey.authorized_clients_dir)
9898
self.auth.configure_curve(domain="*", location=keymonkey.authorized_clients_dir)
9999
self.auth.start()
@@ -143,18 +143,9 @@ def __init__(self,
143143
self.back_up_recurring_thread = None
144144

145145
if backup_database is not None:
146-
if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
147-
LOG.warning("Backup requires Python 3.7 or higher")
148-
raise SQLiteRxBackUpError("SQLite backup requires Python 3.7 or higher")
149-
150-
if sys.platform.startswith('win'):
151-
LOG.warning("Backup is not supported on Windows")
152-
raise SQLiteRxBackUpError("SQLite backup is not supported on Windows")
153-
154-
if platform.python_implementation().lower() == 'pypy':
155-
LOG.warning("Backup is not supported on PyPy python implementation")
156-
raise SQLiteRxBackUpError("SQLite backup is not supported on MacOS for PyPy python implementation")
157-
146+
if not is_backup_supported():
147+
raise SQLiteRxBackUpError(f"SQLite backup is not supported on {sys.platform} or {platform.python_implementation()}")
148+
158149
sqlite_backup = SQLiteBackUp(src=database, target=backup_database)
159150
self.back_up_recurring_thread = RecurringTimer(function=sqlite_backup, interval=backup_interval)
160151
self.back_up_recurring_thread.daemon = True
@@ -187,7 +178,7 @@ def handle_signal(self, signum, frame):
187178

188179
if self.back_up_recurring_thread:
189180
self.back_up_recurring_thread.cancel()
190-
os._exit(os.EX_OK)
181+
raise SystemExit()
191182

192183
def run(self):
193184
LOG.info("Setting up signal handlers")

0 commit comments

Comments
 (0)