From 8e6e0ad91bbdb2f363608904779289bac21ddc9f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 27 Mar 2025 08:44:15 -0500 Subject: [PATCH] PYTHON-5421 Fix handling of client timeout property --- pymongo/asynchronous/mongo_client.py | 1 + pymongo/synchronous/mongo_client.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index 754b8325ed..43dbd49f76 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -758,6 +758,7 @@ def __init__( self._host = host self._port = port self._topology: Topology = None # type: ignore[assignment] + self._timeout: float | None = None # _pool_class, _monitor_class, and _condition_class are for deep # customization of PyMongo, e.g. Motor. diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index 1cedbfe1e2..2d8d6d730b 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -756,6 +756,7 @@ def __init__( self._host = host self._port = port self._topology: Topology = None # type: ignore[assignment] + self._timeout: float | None = None # _pool_class, _monitor_class, and _condition_class are for deep # customization of PyMongo, e.g. Motor.