@@ -183,7 +183,7 @@ def validate_timeout_or_none(option, value):
183183
184184
185185def  validate_read_preference (dummy , value ):
186-     """Validate read preference for a ReplicaSetConnection . 
186+     """Validate read preference for a MongoReplicaSetClient . 
187187    """ 
188188    if  value  in  read_preferences .modes :
189189        return  value 
@@ -196,7 +196,7 @@ def validate_read_preference(dummy, value):
196196
197197
198198def  validate_tag_sets (dummy , value ):
199-     """Validate tag sets for a ReplicaSetConnection . 
199+     """Validate tag sets for a MongoReplicaSetClient . 
200200    """ 
201201    if  value  is  None :
202202        return  [{}]
@@ -359,7 +359,6 @@ def __init__(self, **options):
359359            else :
360360                self .__safe  =  validate_boolean ('safe' ,
361361                                               options .get ("safe" , True ))
362-         # Note: 'safe' is always passed by Connection and ReplicaSetConnection 
363362        # Always do the most "safe" thing, but warn about conflicts. 
364363        if  self .__safe  and  options .get ('w' ) ==  0 :
365364
@@ -370,7 +369,7 @@ def __init__(self, **options):
370369
371370    def  __set_safe_option (self , option , value ):
372371        """Validates and sets getlasterror options for this 
373-         object (Connection , Database, Collection, etc.) 
372+         object (MongoClient , Database, Collection, etc.) 
374373        """ 
375374        if  value  is  None :
376375            self .__write_concern .pop (option , None )
@@ -462,14 +461,6 @@ def __get_write_concern(self):
462461
463462        .. note:: Accessing :attr:`write_concern` returns its value 
464463           (a subclass of :class:`dict`), not a copy. 
465- 
466-         .. warning:: If you are using :class:`~pymongo.connection.Connection` 
467-            or :class:`~pymongo.replica_set_connection.ReplicaSetConnection` 
468-            make sure you explicitly set ``w`` to 1 (or a greater value) or 
469-            :attr:`safe` to ``True``. Unlike calling 
470-            :meth:`set_lasterror_options`, setting an option in 
471-            :attr:`write_concern` does not implicitly set :attr:`safe` 
472-            to ``True``. 
473464        """ 
474465        # To support dict style access we have to return the actual 
475466        # WriteConcern here, not a copy. 
@@ -524,7 +515,7 @@ def __get_tag_sets(self):
524515        To specify a priority-order for tag sets, provide a list of 
525516        tag sets: ``[{'dc': 'ny'}, {'dc': 'la'}, {}]``. A final, empty tag 
526517        set, ``{}``, means "read from any member that matches the mode, 
527-         ignoring tags." ReplicaSetConnection  tries each set of tags in turn 
518+         ignoring tags." MongoReplicaSetClient  tries each set of tags in turn 
528519        until it finds a set of tags with at least one matching member. 
529520
530521           .. seealso:: `Data-Center Awareness 
@@ -678,8 +669,6 @@ def pop1(dct):
678669                    # with no options if safe=True was passed but collection 
679670                    # level defaults have been disabled with w=0. 
680671                    # These should be equivalent: 
681-                     # Connection(w=0).foo.bar.insert({}, safe=True) 
682-                     # MongoClient(w=0).foo.bar.insert({}, w=1) 
683672                    if  options .get ('w' ) ==  0 :
684673                        return  True , {}
685674                # Passing w=0 overrides passing safe=True. 
0 commit comments