Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
d24b4a5
PYTHON-5503 Use uv to install just in GitHub Actions (#2490)
blink1073 Aug 19, 2025
3a26119
PYTHON-5502 Fix c extensions on OIDC VMs (#2489)
blink1073 Aug 19, 2025
db3d3c7
Prep for 4.14.1 release (#2495) [master] (#2496)
sleepyStick Aug 20, 2025
f7b94be
PYTHON-5143 Support auto encryption in unified tests (#2488)
blink1073 Aug 20, 2025
9a9a65c
PYTHON-5496 Update CSOT tests for change in dropIndex behavior in 8.3…
blink1073 Aug 20, 2025
5e96353
PYTHON-5508 - Add built-in DecimalEncoder and DecimalDecoder (#2499)
NoahStapp Aug 21, 2025
e08284b
PYTHON-5456 Support text indexes with auto encryption (#2500)
blink1073 Aug 21, 2025
ddf9508
PYTHON-5510 Fix server selection log message for commitTransaction (#…
ShaneHarvey Aug 22, 2025
3ebd934
PYTHON-5514 Specific assertions for "is" and "is not None" (#2502)
sleepyStick Aug 25, 2025
cd4e5db
Bump pyright from 1.1.403 to 1.1.404 (#2506)
dependabot[bot] Aug 25, 2025
9892e1b
Update coverage requirement from <=7.10.3,>=5 to >=5,<=7.10.5 (#2507)
dependabot[bot] Aug 25, 2025
1179c5c
DRIVERS-3218 Avoid clearing the connection pool when the server conne…
blink1073 Aug 26, 2025
bc91967
set to one byte
blink1073 Aug 26, 2025
8c361be
Bump the actions group with 5 updates (#2505)
dependabot[bot] Aug 26, 2025
0d4c84e
PYTHON-5519 Clean up uv handling (#2510)
blink1073 Aug 26, 2025
f51e8a5
update approach
blink1073 Aug 27, 2025
c1fe2e3
Merge branch 'master' of github.com:mongodb/mongo-python-driver into …
blink1073 Aug 27, 2025
7584d2d
Revert "Merge branch 'master' of github.com:mongodb/mongo-python-driv…
blink1073 Aug 27, 2025
f1544aa
undo topology changes
blink1073 Aug 27, 2025
9d34e52
improve sleep translation
blink1073 Aug 27, 2025
bb5ac35
improve sleep translation
blink1073 Aug 27, 2025
957a87d
PYTHON-5519 Clean up uv handling (#2510)
blink1073 Aug 26, 2025
9d0af17
add prose tests
blink1073 Aug 27, 2025
da0c0e5
debug
blink1073 Aug 27, 2025
70b4113
fix and update tests
blink1073 Aug 27, 2025
c974d36
fix logic
blink1073 Aug 27, 2025
845f17a
only backoff if conn is closed
blink1073 Aug 27, 2025
09fc66d
use AutoReconnect
blink1073 Aug 28, 2025
84478d0
update tests
blink1073 Aug 28, 2025
532c1b8
update handshake error tests
blink1073 Aug 28, 2025
6890c73
undo lock file changes
blink1073 Aug 28, 2025
6f38a9b
add test for limiting maxConnecting
blink1073 Sep 2, 2025
0997248
add sdam check
blink1073 Sep 3, 2025
320cb54
fix pool backoff
blink1073 Sep 4, 2025
7734af7
do not clear the pool on SystemOverloaded
blink1073 Sep 4, 2025
452cdd6
add retryable label
blink1073 Sep 4, 2025
1f44c48
PYTHON-5521 - Update TestBsonSizeBatches.test_06_insert_fails_over_16…
NoahStapp Sep 3, 2025
fa5c151
fix test
blink1073 Sep 5, 2025
0ab78e4
fix test
blink1073 Sep 5, 2025
07d0233
Revert "update handshake error tests"
blink1073 Sep 5, 2025
771570d
update maxConnecting test
blink1073 Sep 5, 2025
6623261
fix maxconnecting test
blink1073 Sep 5, 2025
f602d4c
fix handling of maxConnecting
blink1073 Sep 5, 2025
64aa0af
update test
blink1073 Sep 5, 2025
7f6335e
fix test
blink1073 Sep 10, 2025
6db793d
undo lock file changes
blink1073 Sep 10, 2025
8c2eb91
PYTHON-5538 Clean up uv lock file handling (#2522)
blink1073 Sep 10, 2025
a84a181
wip
blink1073 Sep 10, 2025
c5ce8dd
wip
blink1073 Sep 11, 2025
679807e
update backoff criteria
blink1073 Sep 11, 2025
7e9f19f
update backoff criteria
blink1073 Sep 11, 2025
b0b5800
update backoff criteria
blink1073 Sep 11, 2025
a033c58
handle the already closed case
blink1073 Sep 11, 2025
ded90b0
handle another edge case
blink1073 Sep 11, 2025
2cd3c18
Merge branch 'backpressure' of github.com:mongodb/mongo-python-driver…
blink1073 Sep 22, 2025
0b4b265
address review
blink1073 Sep 22, 2025
7548f7b
clean up logic
blink1073 Sep 22, 2025
5e34bdc
clean up logic
blink1073 Sep 22, 2025
f1294dc
do not try and label errors
blink1073 Sep 22, 2025
6a47fc6
address review
blink1073 Sep 23, 2025
6d57549
fix option pass
blink1073 Sep 23, 2025
9fa3a6f
update load balancer sdam tests
blink1073 Oct 8, 2025
47e55b4
update uri options
blink1073 Oct 8, 2025
4f06bb6
create new client
blink1073 Oct 8, 2025
3c760e7
try again
blink1073 Oct 8, 2025
4cc6619
address review
blink1073 Oct 9, 2025
eaab484
add pool backoff message
blink1073 Oct 9, 2025
65832a7
update enum
blink1073 Oct 9, 2025
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
7 changes: 5 additions & 2 deletions pymongo/network_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,11 @@ async def read(self, request_id: Optional[int], max_message_size: int) -> tuple[
if self._done_messages:
message = await self._done_messages.popleft()
else:
if self._closing_exception:
raise self._closing_exception
if self._closed.done():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is calling is_closing here better? It'll catch more edge cases in theory.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm let me try that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is ambiguous as to whether connection_lost as been called yet. Since connection_lost is synchronous, checking for self._closed.done() assures that we have actually lost the connection.

if self._closing_exception:
raise self._closing_exception
else:
raise OSError("connection closed")
read_waiter = asyncio.get_running_loop().create_future()
self._pending_messages.append(read_waiter)
try:
Expand Down
Loading