diff --git a/doc/changelog.rst b/doc/changelog.rst index f0eb46e6..6456d4a7 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -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]]``. diff --git a/requirements.txt b/requirements.txt index 45c42ede..ff5779ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -pymongo>=4.5,<5 +pymongo>=4.5,<4.9 diff --git a/test/asyncio_tests/test_asyncio_collection.py b/test/asyncio_tests/test_asyncio_collection.py index beaccebf..5d34766d 100644 --- a/test/asyncio_tests/test_asyncio_collection.py +++ b/test/asyncio_tests/test_asyncio_collection.py @@ -26,7 +26,6 @@ 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 @@ async def test_async_encrypt_expression(self): 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 @@ async def test_async_encrypt_expression(self): ] }, key_id=data_key, - algorithm=Algorithm.RANGEPREVIEW, - query_type=QueryType.RANGEPREVIEW, + algorithm="range", + query_type="range", contention_factor=0, range_opts=range_opts, ) diff --git a/test/tornado_tests/test_motor_collection.py b/test/tornado_tests/test_motor_collection.py index 7f183aba..48cd06b4 100644 --- a/test/tornado_tests/test_motor_collection.py +++ b/test/tornado_tests/test_motor_collection.py @@ -25,7 +25,6 @@ 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 @@ async def test_async_encrypt_expression(self): 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 @@ async def test_async_encrypt_expression(self): ] }, key_id=data_key, - algorithm=Algorithm.RANGEPREVIEW, - query_type=QueryType.RANGEPREVIEW, + algorithm="range", + query_type="range", contention_factor=0, range_opts=range_opts, )