diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 8a5da1e56..86cae5d09 100755 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -164,6 +164,7 @@ functions: binary: bash env: TOPOLOGY: replica_set + MONGODB_VERSION: "8.0" args: - ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh - command: "subprocess.exec" diff --git a/bindings/python/pymongocrypt/asynchronous/state_machine.py b/bindings/python/pymongocrypt/asynchronous/state_machine.py index f1a391d38..4468c7c69 100644 --- a/bindings/python/pymongocrypt/asynchronous/state_machine.py +++ b/bindings/python/pymongocrypt/asynchronous/state_machine.py @@ -134,7 +134,7 @@ async def run_state_machine(ctx, callback): ctx.complete_mongo_operation() elif state == lib.MONGOCRYPT_CTX_NEED_MONGO_KEYS: key_filter = ctx.mongo_operation() - for key in await callback.fetch_keys(key_filter): + async for key in callback.fetch_keys(key_filter): ctx.add_mongo_operation_result(key) ctx.complete_mongo_operation() elif state == lib.MONGOCRYPT_CTX_NEED_KMS: diff --git a/bindings/python/test/test_mongocrypt.py b/bindings/python/test/test_mongocrypt.py index d492442c4..a9cca34d2 100644 --- a/bindings/python/test/test_mongocrypt.py +++ b/bindings/python/test/test_mongocrypt.py @@ -478,7 +478,8 @@ async def mark_command(self, ns, cmd): return self.mongocryptd_reply async def fetch_keys(self, filter): - return self.key_docs + for doc in self.key_docs: + yield doc async def insert_data_key(self, data_key): raise NotImplementedError