Skip to content

Commit 6af9a3d

Browse files
committed
Replace deprecated pkgutil with importlib. Add Python 3.14 to the test matrix.
1 parent 5a85a1c commit 6af9a3d

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1515
steps:
1616
- uses: actions/checkout@v4
1717

setup.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2015, Ayun Park. All rights reserved.
55
# For licensing, see LICENSE file included in the package.
66
import sys
7-
import pkgutil
7+
import importlib.util
88
from setuptools import setup
99
from setuptools.command.install import install
1010

@@ -13,9 +13,7 @@ class NewInstall(install):
1313

1414
@staticmethod
1515
def check_pymongo():
16-
if pkgutil.find_loader('pymongo'):
17-
return True
18-
return False
16+
return importlib.util.find_spec('pymongo')
1917

2018
def run(self):
2119
install.run(self)
@@ -37,12 +35,12 @@ def run(self):
3735
keywords="BSON codec",
3836
url="http://github.com/py-bson/bson",
3937
classifiers=[
40-
'Programming Language :: Python :: 2.6',
41-
'Programming Language :: Python :: 2.7',
42-
'Programming Language :: Python :: 3.3',
43-
'Programming Language :: Python :: 3.4',
44-
'Programming Language :: Python :: 3.5',
45-
'Programming Language :: Python :: 3.6',
38+
'Programming Language :: Python :: 3.9',
39+
'Programming Language :: Python :: 3.10',
40+
'Programming Language :: Python :: 3.11',
41+
'Programming Language :: Python :: 3.12',
42+
'Programming Language :: Python :: 3.13',
43+
'Programming Language :: Python :: 3.14',
4644
],
4745
cmdclass={'install': NewInstall}
4846
)

0 commit comments

Comments
 (0)