Skip to content

Commit c42cceb

Browse files
committed
PYTHON-4579 Remove unused param
1 parent 28c598f commit c42cceb

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

pymongo/asynchronous/monitor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,12 @@ async def _check_with_socket(self, conn: AsyncConnection) -> tuple[Hello, float]
361361
):
362362
# Initiate streaming hello (MongoDB 4.4+).
363363
response = await conn._hello(
364-
None,
365364
self._server_description.topology_version,
366365
self._settings.heartbeat_frequency,
367366
)
368367
else:
369368
# New connection handshake or polling hello (MongoDB <4.4).
370-
response = await conn._hello(None, None, None)
369+
response = await conn._hello(None, None)
371370
duration = _monotonic_duration(start)
372371
return response, duration
373372

pymongo/asynchronous/pool.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
from pymongo.pyopenssl_context import _sslConn
103103
from pymongo.read_concern import ReadConcern
104104
from pymongo.read_preferences import _ServerMode
105-
from pymongo.typings import ClusterTime, _Address, _CollationIn
105+
from pymongo.typings import _Address, _CollationIn
106106
from pymongo.write_concern import WriteConcern
107107

108108
try:
@@ -376,11 +376,10 @@ def hello_cmd(self) -> dict[str, Any]:
376376
return {HelloCompat.LEGACY_CMD: 1, "helloOk": True}
377377

378378
async def hello(self) -> Hello:
379-
return await self._hello(None, None, None)
379+
return await self._hello(None, None)
380380

381381
async def _hello(
382382
self,
383-
cluster_time: Optional[ClusterTime],
384383
topology_version: Optional[Any],
385384
heartbeat_frequency: Optional[int],
386385
) -> Hello[dict[str, Any]]:
@@ -403,9 +402,6 @@ async def _hello(
403402
if self.opts.connect_timeout:
404403
self.set_conn_timeout(self.opts.connect_timeout + heartbeat_frequency)
405404

406-
if not performing_handshake and cluster_time is not None:
407-
cmd["$clusterTime"] = cluster_time
408-
409405
creds = self.opts._credentials
410406
if creds:
411407
if creds.mechanism == "DEFAULT" and creds.username:

pymongo/synchronous/monitor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,12 @@ def _check_with_socket(self, conn: Connection) -> tuple[Hello, float]:
359359
):
360360
# Initiate streaming hello (MongoDB 4.4+).
361361
response = conn._hello(
362-
None,
363362
self._server_description.topology_version,
364363
self._settings.heartbeat_frequency,
365364
)
366365
else:
367366
# New connection handshake or polling hello (MongoDB <4.4).
368-
response = conn._hello(None, None, None)
367+
response = conn._hello(None, None)
369368
duration = _monotonic_duration(start)
370369
return response, duration
371370

pymongo/synchronous/pool.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
from pymongo.synchronous.auth import _AuthContext
103103
from pymongo.synchronous.client_session import ClientSession
104104
from pymongo.synchronous.mongo_client import MongoClient, _MongoClientErrorHandler
105-
from pymongo.typings import ClusterTime, _Address, _CollationIn
105+
from pymongo.typings import _Address, _CollationIn
106106
from pymongo.write_concern import WriteConcern
107107

108108
try:
@@ -376,11 +376,10 @@ def hello_cmd(self) -> dict[str, Any]:
376376
return {HelloCompat.LEGACY_CMD: 1, "helloOk": True}
377377

378378
def hello(self) -> Hello:
379-
return self._hello(None, None, None)
379+
return self._hello(None, None)
380380

381381
def _hello(
382382
self,
383-
cluster_time: Optional[ClusterTime],
384383
topology_version: Optional[Any],
385384
heartbeat_frequency: Optional[int],
386385
) -> Hello[dict[str, Any]]:
@@ -403,9 +402,6 @@ def _hello(
403402
if self.opts.connect_timeout:
404403
self.set_conn_timeout(self.opts.connect_timeout + heartbeat_frequency)
405404

406-
if not performing_handshake and cluster_time is not None:
407-
cmd["$clusterTime"] = cluster_time
408-
409405
creds = self.opts._credentials
410406
if creds:
411407
if creds.mechanism == "DEFAULT" and creds.username:

0 commit comments

Comments
 (0)