MOTOR-1368 Cap PyMongo dependency to <4.9 (#309)

This commit is contained in:
Shane Harvey 2024-09-18 12:25:03 -07:00 committed by GitHub
parent 822e0240ea
commit cbe3ca191f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 9 deletions

View File

@ -3,6 +3,10 @@ Changelog
.. currentmodule:: motor.motor_tornado
Motor 3.5.2
-----------
- Update the PyMongo dependency requirement to >=4.5 and <4.9. Apps that require PyMongo >=4.9 must upgrade to Motor >=3.6.
Motor 3.5.1
-----------
- Fix runtime behavior of Motor generic class typing, e.g. ``client: AsyncIOMotorClient[Dict[str, Any]]``.

View File

@ -1 +1 @@
pymongo>=4.5,<5
pymongo>=4.5,<4.9

View File

@ -26,7 +26,6 @@ import pymongo
from bson import CodecOptions
from bson.binary import JAVA_LEGACY
from pymongo import ReadPreference, WriteConcern
from pymongo.encryption import Algorithm, QueryType
from pymongo.errors import BulkWriteError, DuplicateKeyError, OperationFailure
from pymongo.read_concern import ReadConcern
from pymongo.read_preferences import Secondary
@ -304,7 +303,7 @@ class TestAsyncIOCollection(AsyncIOTestCase):
insert_payload = await client_encryption.encrypt(
float(i),
key_id=data_key,
algorithm=Algorithm.RANGEPREVIEW,
algorithm="range",
contention_factor=0,
range_opts=range_opts,
)
@ -323,8 +322,8 @@ class TestAsyncIOCollection(AsyncIOTestCase):
]
},
key_id=data_key,
algorithm=Algorithm.RANGEPREVIEW,
query_type=QueryType.RANGEPREVIEW,
algorithm="range",
query_type="range",
contention_factor=0,
range_opts=range_opts,
)

View File

@ -25,7 +25,6 @@ import pymongo.errors
from bson import CodecOptions
from bson.binary import JAVA_LEGACY
from pymongo import ReadPreference, WriteConcern
from pymongo.encryption import Algorithm, QueryType
from pymongo.errors import BulkWriteError, DuplicateKeyError, OperationFailure
from pymongo.read_concern import ReadConcern
from pymongo.read_preferences import Secondary
@ -306,7 +305,7 @@ class MotorCollectionTest(MotorTest):
insert_payload = await client_encryption.encrypt(
float(i),
key_id=data_key,
algorithm=Algorithm.RANGEPREVIEW,
algorithm="range",
contention_factor=0,
range_opts=range_opts,
)
@ -325,8 +324,8 @@ class MotorCollectionTest(MotorTest):
]
},
key_id=data_key,
algorithm=Algorithm.RANGEPREVIEW,
query_type=QueryType.RANGEPREVIEW,
algorithm="range",
query_type="range",
contention_factor=0,
range_opts=range_opts,
)