Skip to content
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

drop py3.8, restrict pymongo upper version, tox cleanup #68

Merged
merged 3 commits into from
Oct 10, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- '3.11'
Expand Down
6 changes: 5 additions & 1 deletion ming/tests/test_datastore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import io
import sys
from contextlib import redirect_stderr
from unittest import TestCase, main

from unittest.mock import patch, Mock
Expand Down Expand Up @@ -43,8 +45,10 @@ def Connection(*a,**kw):
raise ConnectionFailure()
engine = Engine(Connection, (), {}, 17, True,
_sleep=lambda x:None)
self.assertRaises(ConnectionFailure, engine.connect)
with redirect_stderr(io.StringIO()) as stderr:
self.assertRaises(ConnectionFailure, engine.connect)
self.assertEqual(failures[0], 18)
assert 'ConnectionFailure' in stderr.getvalue()


class TestEngineMim(TestCase):
Expand Down
2 changes: 0 additions & 2 deletions ming/tests/test_declarative.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ def test_ensure_indexes(self):
collection = self.MockSession.db[self.MyDoc.m.collection_name]
create_index = collection.create_index
args = create_index.call_args_list
for a in args:
print(a)
indexes = [
( ([ ('test1', pymongo.ASCENDING), ('test2', pymongo.ASCENDING) ],),
dict(unique=False, sparse=False, background=True) ),
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
'Topic :: Database',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python :: 3',
'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',
], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
python_requires='>=3.8',
python_requires='>=3.9',
keywords='mongo, pymongo',
author='Rick Copeland',
author_email='[email protected]',
Expand All @@ -34,7 +33,7 @@
include_package_data=True,
zip_safe=True,
install_requires=[
"pymongo",
"pymongo<4.9",
"pytz",
],
tests_require=[
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
skip_missing_interpreters = True
envlist =
py{38,39,310,311,312}-pymongo{3,4},pypy3-pymongo{3,4}
py{39,310,311,312}-pymongo{3,4},pypy3-pymongo{3,4}

[testenv]
install_command = pip install {opts} {packages}
Expand All @@ -15,7 +15,7 @@ deps =
pymongo3: pymongo<4
pymongo4: pymongo>=4
commands =
coverage run --source ming -m unittest discover -v
coverage run --source ming -m unittest discover
- coverage report
- coverage xml

Expand Down