Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3da6e85

Browse files
aclark4lifeNoahStapp
andauthored
PYTHON-5543 PyMongoBaseProtocol should inherit from asyncio.BaseProtocol (#2528)
Co-authored-by: Noah Stapp <noah@noahstapp.com>
1 parent 2b14886 commit 3da6e85

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎doc/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
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+
412
Changes in Version 4.15.0 (2025年09月10日)
513
--------------------------------------
614

‎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 BaseTransport, BufferedProtocol, Future, Protocol, Transport
25+
from asyncio import BaseProtocol, BaseTransport, BufferedProtocol, Future, 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(Protocol):
253+
class PyMongoBaseProtocol(BaseProtocol):
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)

AltStyle によって変換されたページ (->オリジナル) /