Skip to content

Commit

Permalink
MOTOR-1368 Cap PyMongo dependency to <4.9 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneHarvey authored Sep 18, 2024
1 parent 822e024 commit cbe3ca1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 4 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]]``.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pymongo>=4.5,<5
pymongo>=4.5,<4.9
7 changes: 3 additions & 4 deletions test/asyncio_tests/test_asyncio_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand Down
7 changes: 3 additions & 4 deletions test/tornado_tests/test_motor_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand Down

0 comments on commit cbe3ca1

Please sign in to comment.