From 3e02957998fb2fcde0f427a6efe54e782d048295 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Fri, 6 Aug 2021 12:33:26 -0700 Subject: [PATCH] PYTHON-2288 Finish removing IsMaster from docs --- doc/api/pymongo/ismaster.rst | 10 ---------- pymongo/monitor.py | 2 +- pymongo/monitoring.py | 2 +- pymongo/server_description.py | 2 +- test/test_streaming_protocol.py | 4 ++-- 5 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 doc/api/pymongo/ismaster.rst diff --git a/doc/api/pymongo/ismaster.rst b/doc/api/pymongo/ismaster.rst deleted file mode 100644 index 881e874e1..000000000 --- a/doc/api/pymongo/ismaster.rst +++ /dev/null @@ -1,10 +0,0 @@ -:orphan: - -:mod:`ismaster` -- A wrapper for ismaster command responses. -============================================================ - -.. automodule:: pymongo.ismaster - - .. autoclass:: pymongo.ismaster.IsMaster(doc) - - .. autoattribute:: document diff --git a/pymongo/monitor.py b/pymongo/monitor.py index 4817ad240..df673b720 100644 --- a/pymongo/monitor.py +++ b/pymongo/monitor.py @@ -260,7 +260,7 @@ class Monitor(MonitorBase): return sd def _check_with_socket(self, conn): - """Return (IsMaster, round_trip_time). + """Return (Hello, round_trip_time). Can raise ConnectionFailure or OperationFailure. """ diff --git a/pymongo/monitoring.py b/pymongo/monitoring.py index c72e83680..147be2a46 100644 --- a/pymongo/monitoring.py +++ b/pymongo/monitoring.py @@ -1196,7 +1196,7 @@ class ServerHeartbeatSucceededEvent(_ServerHeartbeatEvent): @property def reply(self): - """An instance of :class:`~pymongo.ismaster.IsMaster`.""" + """An instance of :class:`~pymongo.hello.Hello`.""" return self.__reply @property diff --git a/pymongo/server_description.py b/pymongo/server_description.py index 462ad135c..1c64a8fd5 100644 --- a/pymongo/server_description.py +++ b/pymongo/server_description.py @@ -26,7 +26,7 @@ class ServerDescription(object): :Parameters: - `address`: A (host, port) pair - - `ismaster`: Optional IsMaster instance + - `ismaster`: Optional Hello instance - `round_trip_time`: Optional float - `error`: Optional, the last error attempting to connect to the server """ diff --git a/test/test_streaming_protocol.py b/test/test_streaming_protocol.py index 07310586a..f2b2c7cca 100644 --- a/test/test_streaming_protocol.py +++ b/test/test_streaming_protocol.py @@ -38,7 +38,7 @@ class TestStreamingProtocol(IntegrationTest): hb_listener = HeartbeatEventListener() client = rs_or_single_client( event_listeners=[listener, hb_listener], heartbeatFrequencyMS=500, - appName='failingIsMasterTest') + appName='failingHeartbeatTest') self.addCleanup(client.close) # Force a connection. client.admin.command('ping') @@ -52,7 +52,7 @@ class TestStreamingProtocol(IntegrationTest): 'failCommands': ['isMaster', 'hello'], 'closeConnection': False, 'errorCode': 10107, - 'appName': 'failingIsMasterTest', + 'appName': 'failingHeartbeatTest', }, } with self.fail_point(fail_ismaster):