From 7e904b3c31d3242ef9e202438e50cbecf611af75 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Thu, 17 Oct 2024 13:11:20 -0700 Subject: [PATCH 1/2] PYTHON-4874 Fix async Windows KMS support (#1942) --- pymongo/network_layer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymongo/network_layer.py b/pymongo/network_layer.py index 7a325853c..aa16e85a0 100644 --- a/pymongo/network_layer.py +++ b/pymongo/network_layer.py @@ -215,11 +215,11 @@ else: while total_read < length: try: read = conn.recv_into(mv[total_read:]) + if read == 0: + raise OSError("connection closed") # KMS responses update their expected size after the first batch, stop reading after one loop if once: return mv[:read] - if read == 0: - raise OSError("connection closed") except BLOCKING_IO_ERRORS: await asyncio.sleep(backoff) read = 0 From 335b728f070a350239123a755856a1a3d1d51746 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 20:27:27 -0500 Subject: [PATCH 2/2] Bump pyright from 1.1.383 to 1.1.384 (#1922) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jib --- requirements/typing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/typing.txt b/requirements/typing.txt index 06c33c6db..2c23212da 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,5 +1,5 @@ mypy==1.11.2 -pyright==1.1.383 +pyright==1.1.384 typing_extensions -r ./encryption.txt -r ./ocsp.txt