Skip to content

Commit 9508ba5

Browse files
committed
PYTHON-1321 Remove MongoReplicaSetClient
1 parent 6e8c370 commit 9508ba5

10 files changed

+12
-469
lines changed

doc/api/pymongo/index.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
Alias for :class:`pymongo.mongo_client.MongoClient`.
1111

12-
.. data:: MongoReplicaSetClient
13-
14-
Alias for :class:`pymongo.mongo_replica_set_client.MongoReplicaSetClient`.
15-
1612
.. data:: ReadPreference
1713

1814
Alias for :class:`pymongo.read_preferences.ReadPreference`.
@@ -46,7 +42,6 @@ Sub-modules:
4642
errors
4743
message
4844
mongo_client
49-
mongo_replica_set_client
5045
monitoring
5146
operations
5247
pool

doc/api/pymongo/mongo_replica_set_client.rst

Lines changed: 0 additions & 32 deletions
This file was deleted.

doc/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Breaking Changes in 4.0
2525
- Removed :meth:`pymongo.database.Database.collection_names`.
2626
- Removed :meth:`pymongo.collection.Collection.parallel_scan`.
2727
- Removed :mod:`pymongo.thread_util`.
28+
- Removed :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`.
2829

2930
Notable improvements
3031
....................

doc/migrate-to-pymongo4.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ Warnings can also be changed to errors::
5050
.. note:: Not all deprecated features raise :exc:`DeprecationWarning` when
5151
used. See `Removed features with no migration path`_.
5252

53+
MongoReplicaSetClient
54+
---------------------
55+
56+
Removed :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`.
57+
Use :class:`pymongo.mongo_client.MongoClient` instead.
58+
5359
MongoClient
5460
-----------
5561

pymongo/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def get_version_string():
8989
MAX_SUPPORTED_WIRE_VERSION)
9090
from pymongo.cursor import CursorType
9191
from pymongo.mongo_client import MongoClient
92-
from pymongo.mongo_replica_set_client import MongoReplicaSetClient
9392
from pymongo.operations import (IndexModel,
9493
InsertOne,
9594
DeleteOne,

pymongo/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def validate_read_preference(dummy, value):
364364

365365

366366
def validate_read_preference_mode(dummy, value):
367-
"""Validate read preference mode for a MongoReplicaSetClient.
367+
"""Validate read preference mode for a MongoClient.
368368
369369
.. versionchanged:: 3.5
370370
Returns the original ``value`` instead of the validated read preference

pymongo/mongo_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,8 +1001,7 @@ def primary(self):
10011001
`replicaSet` option.
10021002
10031003
.. versionadded:: 3.0
1004-
MongoClient gained this property in version 3.0 when
1005-
MongoReplicaSetClient's functionality was merged in.
1004+
MongoClient gained this property in version 3.0.
10061005
"""
10071006
return self._topology.get_primary()
10081007

@@ -1015,8 +1014,7 @@ def secondaries(self):
10151014
client was created without the `replicaSet` option.
10161015
10171016
.. versionadded:: 3.0
1018-
MongoClient gained this property in version 3.0 when
1019-
MongoReplicaSetClient's functionality was merged in.
1017+
MongoClient gained this property in version 3.0.
10201018
"""
10211019
return self._topology.get_secondaries()
10221020

pymongo/mongo_replica_set_client.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

pymongo/read_preferences.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939

4040
def _validate_tag_sets(tag_sets):
41-
"""Validate tag sets for a MongoReplicaSetClient.
41+
"""Validate tag sets for a MongoClient.
4242
"""
4343
if tag_sets is None:
4444
return tag_sets
@@ -144,7 +144,7 @@ def tag_sets(self):
144144
To specify a priority-order for tag sets, provide a list of
145145
tag sets: ``[{'dc': 'ny'}, {'dc': 'la'}, {}]``. A final, empty tag
146146
set, ``{}``, means "read from any member that matches the mode,
147-
ignoring tags." MongoReplicaSetClient tries each set of tags in turn
147+
ignoring tags." MongoClient tries each set of tags in turn
148148
until it finds a set of tags with at least one matching member.
149149
150150
.. seealso:: `Data-Center Awareness

0 commit comments

Comments
 (0)