Skip to content

Commit e9db3be

Browse files
committed
Revert "PYTHON-5543 PyMongoBaseProtocol should inherit from asyncio.BaseProtocol (mongodb#2528)"
This reverts commit 3da6e85.
1 parent 3da6e85 commit e9db3be

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

doc/changelog.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
Changelog
22
=========
33

4-
Changes in Version 4.15.1 (XXXX/XX/XX)
5-
--------------------------------------
6-
7-
Version 4.15.1 is a bug fix release.
8-
9-
- Fixed a bug in ``AsyncMongoClient`` that caused a
10-
``ServerSelectionTimeoutError`` when used with ``uvicorn``, ``FastAPI``, or ``uvloop``.
11-
124
Changes in Version 4.15.0 (2025/09/10)
135
--------------------------------------
146

pymongo/network_layer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import struct
2323
import sys
2424
import time
25-
from asyncio import BaseProtocol, BaseTransport, BufferedProtocol, Future, Transport
25+
from asyncio import BaseTransport, BufferedProtocol, Future, Protocol, Transport
2626
from typing import (
2727
TYPE_CHECKING,
2828
Any,
@@ -250,7 +250,7 @@ def recv_into(self, buffer: bytes | memoryview) -> int:
250250
return self.conn.recv_into(buffer)
251251

252252

253-
class PyMongoBaseProtocol(BaseProtocol):
253+
class PyMongoBaseProtocol(Protocol):
254254
def __init__(self, timeout: Optional[float] = None):
255255
self.transport: Transport = None # type: ignore[assignment]
256256
self._timeout = timeout

0 commit comments

Comments
 (0)