Skip to content

Commit cbe3ca1

Browse files
authored
MOTOR-1368 Cap PyMongo dependency to <4.9 (#309)
1 parent 822e024 commit cbe3ca1

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

doc/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Changelog
33

44
.. currentmodule:: motor.motor_tornado
55

6+
Motor 3.5.2
7+
-----------
8+
- Update the PyMongo dependency requirement to >=4.5 and <4.9. Apps that require PyMongo >=4.9 must upgrade to Motor >=3.6.
9+
610
Motor 3.5.1
711
-----------
812
- Fix runtime behavior of Motor generic class typing, e.g. ``client: AsyncIOMotorClient[Dict[str, Any]]``.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pymongo>=4.5,<5
1+
pymongo>=4.5,<4.9

test/asyncio_tests/test_asyncio_collection.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from bson import CodecOptions
2727
from bson.binary import JAVA_LEGACY
2828
from pymongo import ReadPreference, WriteConcern
29-
from pymongo.encryption import Algorithm, QueryType
3029
from pymongo.errors import BulkWriteError, DuplicateKeyError, OperationFailure
3130
from pymongo.read_concern import ReadConcern
3231
from pymongo.read_preferences import Secondary
@@ -304,7 +303,7 @@ async def test_async_encrypt_expression(self):
304303
insert_payload = await client_encryption.encrypt(
305304
float(i),
306305
key_id=data_key,
307-
algorithm=Algorithm.RANGEPREVIEW,
306+
algorithm="range",
308307
contention_factor=0,
309308
range_opts=range_opts,
310309
)
@@ -323,8 +322,8 @@ async def test_async_encrypt_expression(self):
323322
]
324323
},
325324
key_id=data_key,
326-
algorithm=Algorithm.RANGEPREVIEW,
327-
query_type=QueryType.RANGEPREVIEW,
325+
algorithm="range",
326+
query_type="range",
328327
contention_factor=0,
329328
range_opts=range_opts,
330329
)

test/tornado_tests/test_motor_collection.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from bson import CodecOptions
2626
from bson.binary import JAVA_LEGACY
2727
from pymongo import ReadPreference, WriteConcern
28-
from pymongo.encryption import Algorithm, QueryType
2928
from pymongo.errors import BulkWriteError, DuplicateKeyError, OperationFailure
3029
from pymongo.read_concern import ReadConcern
3130
from pymongo.read_preferences import Secondary
@@ -306,7 +305,7 @@ async def test_async_encrypt_expression(self):
306305
insert_payload = await client_encryption.encrypt(
307306
float(i),
308307
key_id=data_key,
309-
algorithm=Algorithm.RANGEPREVIEW,
308+
algorithm="range",
310309
contention_factor=0,
311310
range_opts=range_opts,
312311
)
@@ -325,8 +324,8 @@ async def test_async_encrypt_expression(self):
325324
]
326325
},
327326
key_id=data_key,
328-
algorithm=Algorithm.RANGEPREVIEW,
329-
query_type=QueryType.RANGEPREVIEW,
327+
algorithm="range",
328+
query_type="range",
330329
contention_factor=0,
331330
range_opts=range_opts,
332331
)

0 commit comments

Comments
 (0)