Skip to content

PYTHON-3383 [pymongoexplain] Support Python 3.7-3.12 #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Global owner for repo
* @blink1073 @juliusgeo @ShaneHarvey
* @mongodb-labs/dbx-python
26 changes: 10 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,31 @@ on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
mongodb-version: ["4.4"]
pymongo-version: ["3.11.0", "4.0.0"]
# pymongo 4.0 does not support python 3.5
exclude:
- python-version: "3.5"
pymongo-version: "4.0.0"

python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.7"]
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.7.0
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-version: "4.4"
mongodb-replica-set: test-rs
# add caching to reduce bandwidth and save time
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version}}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version}}-pip-
- name: Test with python
run: |
python -m pip install pymongo==${{ matrix.pymongo-version }}
python -m pip install -e .
python setup.py test
python -m pip install -e ".[test]"
python -m unittest discover .
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ Please include all of the following information when opening an issue:
Dependencies
============

PyMongoExplain requires CPython 3.5+, and PyPy3.5+.
PyMongoExplain requires CPython 3.7+, and PyPy3.7+.

PyMongoExplain requires `PyMongo>=3.10,<4 <https://github.com/mongodb/mongo-python-driver/>`_
PyMongoExplain requires `PyMongo>=4.4 <https://github.com/mongodb/mongo-python-driver/>`_

Testing
=======

The easiest way to run the tests is to run **python setup.py test** in
The easiest way to run the tests is to run **pip install -e ".[test]"; python -m pytest** in
the root of the distribution.

Tutorial
Expand Down
6 changes: 6 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
=========

Changes in version 1.3.0
------------------------
- Added support for Python 3.11 and 3.12. Dropped support for Python versions
less than 3.7.
- Dropped support for PyMongo versions less than 4.0.

Changes in version 1.2.0
------------------------
- Added ability to configure explain command options using constructor
Expand Down
2 changes: 1 addition & 1 deletion pymongoexplain/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = '1.2.0'
__version__ = '1.3.0'
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pymongoexplain"
dynamic = ["version"]
description = "Explainable CRUD API for PyMongo"
readme = "README.rst"
license = { file = "LICENSE" }
requires-python = ">=3.7"
authors = [
{ name = "Julius Park" },
]
keywords = [
"mongo",
"mongodb",
"pymongo",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Database",
]
dependencies = [
"pymongo>=4.4",
]

[project.scripts]
pymongoexplain = "pymongoexplain.cli_explain:cli_explain"

[project.urls]
Homepage = "https://github.com/mongodb-labs/pymongoexplain"

[project.optional-dependencies]
test = ["pytest"]

[tool.setuptools.dynamic]
version = {attr = "pymongoexplain.version.__version__"}

[tool.setuptools.packages.find]
include = ["pymongoexplain"]
48 changes: 1 addition & 47 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,2 @@
import os

from setuptools import setup, find_packages

with open('README.rst', 'rb') as f:
LONG_DESCRIPTION = f.read().decode('utf8')

# Single source the version.
version_file = os.path.realpath(os.path.join(
os.path.dirname(__file__), 'pymongoexplain', 'version.py'))
version = {}
with open(version_file) as fp:
exec(fp.read(), version)

setup(
name="pymongoexplain",
version=version['__version__'],
description="Explainable CRUD API for PyMongo",
long_description=LONG_DESCRIPTION,
packages=find_packages(exclude=['test']),
author="Julius Park",
url="https://github.com/mongodb-labs/pymongoexplain",
keywords=["mongo", "mongodb", "pymongo"],
test_suite="test",
entry_points={
'console_scripts': [
'pymongoexplain=pymongoexplain.cli_explain:cli_explain'],
},
tests_require=["pymongo>=3.10"],
install_requires=['pymongo>=3.10'],
python_requires='>=3.5',
license="Apache License, Version 2.0",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Database"]
)
from setuptools import setup; setup()
155 changes: 0 additions & 155 deletions test/crud/v2/unacknowledged-bulkWrite-delete-hint-clientError.json

This file was deleted.

Loading