Skip to content

Commit 37abda5

Browse files
author
Bernie Hackett
committed
PYTHON-525 Remove MasterSlaveConnection
MongoDB master/slave clusters are deprecated. Use replica sets instead. If you must use this client class the 2.x branch of PyMongo will continue to be maintained for some time.
1 parent 814434c commit 37abda5

File tree

7 files changed

+9
-901
lines changed

7 files changed

+9
-901
lines changed

doc/api/pymongo/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Sub-modules:
3434
cursor
3535
bulk
3636
errors
37-
master_slave_connection
3837
message
3938
mongo_client
4039
mongo_replica_set_client

doc/api/pymongo/master_slave_connection.rst

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

pymongo/collection.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,7 @@ def process_cursor(cursor):
889889
890890
# All documents have now been processed.
891891
892-
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
893-
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
892+
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`,
894893
if the `read_preference` attribute of this instance is not set to
895894
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
896895
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`
@@ -1247,8 +1246,7 @@ def aggregate(self, pipeline, **kwargs):
12471246
"""Perform an aggregation using the aggregation framework on this
12481247
collection.
12491248
1250-
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
1251-
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
1249+
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`,
12521250
if the `read_preference` attribute of this instance is not set to
12531251
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
12541252
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`
@@ -1324,8 +1322,7 @@ def group(self, key, condition, initial, reduce, finalize=None, **kwargs):
13241322
function to be applied to each document, returning the key
13251323
to group by.
13261324
1327-
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
1328-
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
1325+
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`,
13291326
if the `read_preference` attribute of this instance is not set to
13301327
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
13311328
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`
@@ -1503,8 +1500,7 @@ def inline_map_reduce(self, map, reduce, full_response=False, **kwargs):
15031500
result documents in a list. Otherwise, returns the full
15041501
response from the server to the `map reduce command`_.
15051502
1506-
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
1507-
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
1503+
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`,
15081504
if the `read_preference` attribute of this instance is not set to
15091505
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
15101506
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`

pymongo/cursor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,7 @@ def count(self, with_limit_and_skip=False):
672672
`with_limit_and_skip` to ``True`` if that is the desired behavior.
673673
Raises :class:`~pymongo.errors.OperationFailure` on a database error.
674674
675-
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
676-
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
675+
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`,
677676
if `read_preference` is not
678677
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
679678
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`, the
@@ -729,8 +728,7 @@ def distinct(self, key):
729728
Raises :class:`TypeError` if `key` is not an instance of
730729
:class:`basestring` (:class:`str` in python 3).
731730
732-
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
733-
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
731+
With :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`,
734732
if `read_preference` is not
735733
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or
736734
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY_PREFERRED`, the

0 commit comments

Comments
 (0)