diff --git a/doc/changelog.rst b/doc/changelog.rst index 64c61e5877..8fb2d12f96 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -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 ``AsyncMongoClient`` that caused a + ``ServerSelectionTimeoutError`` when used with ``uvicorn``, ``FastAPI``, or ``uvloop``. + Changes in Version 4.15.0 (2025/09/10) -------------------------------------- diff --git a/pymongo/network_layer.py b/pymongo/network_layer.py index 028316de34..a3900e30c1 100644 --- a/pymongo/network_layer.py +++ b/pymongo/network_layer.py @@ -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, @@ -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