Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions pymongo/asynchronous/encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ async def collection_info(

:return: The first document from the listCollections command response as BSON.
"""
async with self.client_ref()[database].list_collections(
async with await self.client_ref()[database].list_collections(
filter=RawBSONDocument(filter)
) as cursor:
for doc in cursor:
async for doc in cursor:
return _dict_to_bson(doc, False, _DATA_KEY_OPTS)
return None

Expand Down
2 changes: 1 addition & 1 deletion pymongo/asynchronous/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ async def command(
)

if client and client._encrypter and reply:
decrypted = client._encrypter.decrypt(reply.raw_command_response())
decrypted = await client._encrypter.decrypt(reply.raw_command_response())
response_doc = cast(
"_DocumentOut", _decode_all_selective(decrypted, codec_options, user_fields)[0]
)
Expand Down
2 changes: 1 addition & 1 deletion pymongo/asynchronous/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ async def run_operation(
client = operation.client # type: ignore[assignment]
if client and client._encrypter:
if use_cmd:
decrypted = client._encrypter.decrypt(reply.raw_command_response())
decrypted = await client._encrypter.decrypt(reply.raw_command_response())
docs = _decode_all_selective(decrypted, operation.codec_options, user_fields)

response: Response
Expand Down
2 changes: 1 addition & 1 deletion pymongo/synchronous/mongo_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ def close(self) -> None:

if not _IS_SYNC:
# Add support for contextlib.closing.
aclose = close
close = close

def _get_topology(self) -> Topology:
"""Get the internal :class:`~pymongo.topology.Topology` object.
Expand Down
Loading
Loading