Skip to content

Commit 31beb2b

Browse files
committed
Fix a few ReadPreference doc issues.
1 parent e48738b commit 31beb2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/examples/high_availability.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Secondary Reads
180180

181181
By default an instance of MongoReplicaSetClient will only send queries to
182182
the primary member of the replica set. To use secondaries for queries
183-
we have to change the :class:`~pymongo.read_preference.ReadPreference`::
183+
we have to change the :class:`~pymongo.read_preferences.ReadPreference`::
184184

185185
>>> db = MongoReplicaSetClient("morton.local:27017", replicaSet='foo').test
186186
>>> from pymongo.read_preference import ReadPreference

pymongo/collection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,9 +1010,9 @@ def aggregate(self, pipeline):
10101010
With :class:`~pymongo.replica_set_connection.ReplicaSetConnection`
10111011
or :class:`~pymongo.master_slave_connection.MasterSlaveConnection`,
10121012
if the `read_preference` attribute of this instance is not set to
1013-
:attr:`pymongo.ReadPreference.PRIMARY` or the (deprecated)
1014-
`slave_okay` attribute of this instance is set to `True` the
1015-
`aggregate command`_ will be sent to a secondary or slave.
1013+
:attr:`pymongo.read_preferences.ReadPreference.PRIMARY` or the
1014+
(deprecated) `slave_okay` attribute of this instance is set to `True`
1015+
the `aggregate command`_ will be sent to a secondary or slave.
10161016
10171017
:Parameters:
10181018
- `pipeline`: a single command or list of aggregation commands

0 commit comments

Comments
 (0)