Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit d449f1d

Browse files
authored
Merge pull request #31 from ttqureshi/ttqureshi/py-312
Drop Python 3.8 & Add Support for Python 3.12
2 parents b804612 + 9bfe45f commit d449f1d

10 files changed

Lines changed: 95 additions & 88 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest]
17-
python-version: ['3.8']
17+
python-version: ['3.11', '3.12']
1818
toxenv: [testenv]
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: setup python
23-
uses: actions/setup-python@v2
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626

.github/workflows/pypi-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111

1212
steps:
1313
- name: Checkout Repo
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: setup python
17-
uses: actions/setup-python@v3
17+
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.8
19+
python-version: 3.12
2020

2121
- name: Install pip
2222
run: pip install -r requirements/pip.txt

mongodb_proxy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import pymongo.collection
2121
import time
2222

23+
from pymongo.database import Database
24+
2325
log = logging.getLogger(__name__)
2426

2527
MONGO_METHODS_NEEDING_RETRY = {
@@ -104,7 +106,7 @@ def __getattr__(self, key):
104106
that handles AutoReconnect exceptions. Otherwise wrap it in a MongoProxy object.
105107
"""
106108
attr = getattr(self.proxied_object, key)
107-
if hasattr(attr, '__call__') or isinstance(attr, pymongo.database.Database):
109+
if hasattr(attr, '__call__') or isinstance(attr, Database):
108110
attributes_for_class = self.methods_needing_retry.get(self.proxied_object.__class__, [])
109111
if key in attributes_for_class:
110112
return autoretry_read(self.wait_time)(attr)

requirements/base.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
pymongo==4.1.1
7+
dnspython==2.7.0
8+
# via pymongo
9+
pymongo==4.12.0
810
# via -r requirements/base.in

requirements/ci.txt

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
distlib==0.3.4
7+
cachetools==5.5.2
88
# via
9-
# -r requirements/tox.txt
10-
# virtualenv
11-
filelock==3.7.1
9+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
10+
# tox
11+
chardet==5.2.0
1212
# via
13-
# -r requirements/tox.txt
13+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
1414
# tox
15-
# virtualenv
16-
packaging==21.3
15+
colorama==0.4.6
1716
# via
18-
# -r requirements/tox.txt
17+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
1918
# tox
20-
platformdirs==2.5.2
19+
distlib==0.3.9
2120
# via
22-
# -r requirements/tox.txt
21+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
2322
# virtualenv
24-
pluggy==1.0.0
23+
filelock==3.18.0
2524
# via
26-
# -r requirements/tox.txt
25+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
2726
# tox
28-
py==1.11.0
27+
# virtualenv
28+
packaging==25.0
2929
# via
30-
# -r requirements/tox.txt
30+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
31+
# pyproject-api
3132
# tox
32-
pyparsing==3.0.9
33+
platformdirs==4.3.7
3334
# via
34-
# -r requirements/tox.txt
35-
# packaging
36-
six==1.16.0
37-
# via
38-
# -r requirements/tox.txt
35+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
3936
# tox
4037
# virtualenv
41-
toml==0.10.2
38+
pluggy==1.5.0
39+
# via
40+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
41+
# tox
42+
pyproject-api==1.9.0
4243
# via
43-
# -r requirements/tox.txt
44+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
4445
# tox
45-
tox==3.25.0
46-
# via -r requirements/tox.txt
47-
virtualenv==20.14.1
46+
tox==4.25.0
47+
# via -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
48+
virtualenv==20.30.0
4849
# via
49-
# -r requirements/tox.txt
50+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/tox.txt
5051
# tox

requirements/pip.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#
2-
# This file is autogenerated by pip-compile
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
wheel==0.37.1
7+
wheel==0.45.1
88
# via -r requirements/pip.in
99

1010
# The following packages are considered to be unsafe in a requirements file:
11-
pip==22.1.2
11+
pip==25.0.1
1212
# via -r requirements/pip.in
13-
setuptools==62.3.2
13+
setuptools==79.0.0
1414
# via -r requirements/pip.in

requirements/pip_tools.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
#
2-
# This file is autogenerated by pip-compile
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
click==8.1.3
7+
build==1.2.2.post1
88
# via pip-tools
9-
pep517==0.12.0
9+
click==8.1.8
1010
# via pip-tools
11-
pip-tools==6.6.2
11+
packaging==25.0
12+
# via build
13+
pip-tools==7.4.1
1214
# via -r requirements/pip_tools.in
13-
tomli==2.0.1
14-
# via pep517
15-
wheel==0.37.1
15+
pyproject-hooks==1.2.0
16+
# via
17+
# build
18+
# pip-tools
19+
wheel==0.45.1
1620
# via pip-tools
1721

1822
# The following packages are considered to be unsafe in a requirements file:

requirements/test.txt

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
attrs==21.4.0
7+
dnspython==2.7.0
8+
# via
9+
# -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/base.txt
10+
# pymongo
11+
iniconfig==2.1.0
812
# via pytest
9-
iniconfig==1.1.1
13+
packaging==25.0
1014
# via pytest
11-
packaging==21.3
15+
pluggy==1.5.0
1216
# via pytest
13-
pluggy==1.0.0
14-
# via pytest
15-
py==1.11.0
16-
# via pytest
17-
pymongo==4.1.1
18-
# via -r requirements/base.txt
19-
pyparsing==3.0.9
20-
# via packaging
21-
pytest==7.1.2
17+
pymongo==4.12.0
18+
# via -r /Users/tayyab.tahir/Documents/Axim/openedx_repos/MongoDBProxy/requirements/base.txt
19+
pytest==8.3.5
2220
# via -r requirements/test.in
23-
tomli==2.0.1
24-
# via pytest

requirements/tox.txt

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.8
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
44
#
55
# make upgrade
66
#
7-
distlib==0.3.4
7+
cachetools==5.5.2
8+
# via tox
9+
chardet==5.2.0
10+
# via tox
11+
colorama==0.4.6
12+
# via tox
13+
distlib==0.3.9
814
# via virtualenv
9-
filelock==3.7.1
15+
filelock==3.18.0
1016
# via
1117
# tox
1218
# virtualenv
13-
packaging==21.3
14-
# via tox
15-
platformdirs==2.5.2
16-
# via virtualenv
17-
pluggy==1.0.0
18-
# via tox
19-
py==1.11.0
20-
# via tox
21-
pyparsing==3.0.9
22-
# via packaging
23-
six==1.16.0
19+
packaging==25.0
20+
# via
21+
# pyproject-api
22+
# tox
23+
platformdirs==4.3.7
2424
# via
2525
# tox
2626
# virtualenv
27-
toml==0.10.2
27+
pluggy==1.5.0
28+
# via tox
29+
pyproject-api==1.9.0
2830
# via tox
29-
tox==3.25.0
31+
tox==4.25.0
3032
# via -r requirements/tox.in
31-
virtualenv==20.14.1
33+
virtualenv==20.30.0
3234
# via tox

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def is_requirement(line):
4646
setup(
4747
name='openedx-mongodbproxy',
4848
py_modules=['mongodb_proxy'],
49-
version='0.2.2',
49+
version='0.3.0',
5050
description='Proxy around MongoDB connection that automatically handles AutoReconnect exceptions.',
5151
author='Gustav Arngarden',
5252
long_description=README_MARKDOWN,
@@ -55,8 +55,8 @@ def is_requirement(line):
5555
'License :: OSI Approved :: Apache Software License',
5656
'Programming Language :: Python',
5757
'Programming Language :: Python :: 3',
58-
'Programming Language :: Python :: 3.6',
59-
'Programming Language :: Python :: 3.8',
58+
'Programming Language :: Python :: 3.11',
59+
'Programming Language :: Python :: 3.12',
6060
],
6161
install_requires=load_requirements('requirements/base.in'),
6262
url="https://github.com/arngarden/MongoDBProxy"

0 commit comments

Comments
 (0)