Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

Changes in Version 4.15.1 (XXXX/XX/XX)
--------------------------------------

Version 4.15.1 is a bug fix release.

- Fixed a bug in ``MongoClient.network_layer`` and ``AsyncMongoClient.network_layer``
that could cause an ``TimeoutError`` when connecting to servers.
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to call out that the bug was in network_layer. We do need to call out that it was a bug with AsyncMongoClient, and only with uvicorn and uvloop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I'll fix, what about the difference between PYTHON-5543 and PYTHON-5544? I couldn't reproduce for PYTHON-5543 because the reproducer was incomplete. Should we assume some use of uvicorn with FastAPI?

Copy link
Member

Choose a reason for hiding this comment

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

I closed PYTHON-5543 as a duplicate. Let me know if that's incorrect.

Copy link
Contributor

Choose a reason for hiding this comment

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

uvicorn defaults to uvloop under the hood.


Changes in Version 4.15.0 (2025/09/10)
--------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions pymongo/network_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import struct
import sys
import time
from asyncio import BaseTransport, BufferedProtocol, Future, Protocol, Transport
from asyncio import BaseProtocol, BaseTransport, BufferedProtocol, Future, Transport
from typing import (
TYPE_CHECKING,
Any,
Expand Down Expand Up @@ -250,7 +250,7 @@ def recv_into(self, buffer: bytes | memoryview) -> int:
return self.conn.recv_into(buffer)


class PyMongoBaseProtocol(Protocol):
class PyMongoBaseProtocol(BaseProtocol):
def __init__(self, timeout: Optional[float] = None):
self.transport: Transport = None # type: ignore[assignment]
self._timeout = timeout
Expand Down
Loading