@@ -205,6 +205,12 @@ def __init__(
205205 - `connect` (optional): if ``True`` (the default), immediately
206206 begin connecting to MongoDB in the background. Otherwise connect
207207 on the first operation.
208+ - `directConnection` (optional): if ``True``, forces this client to
209+ connect directly to the specified MongoDB host as a standalone.
210+ If ``false``, the client connects to the entire replica set of
211+ which the given MongoDB host(s) is a part. If this is ``True``
212+ and a mongodb+srv:// URI or a URI containing multiple seeds is
213+ provided, an exception will be raised.
208214
209215 | **Other optional parameters can be passed as keyword arguments:**
210216
@@ -492,8 +498,10 @@ def __init__(
492498 .. mongodoc:: connections
493499
494500 .. versionchanged:: 3.11
495- Added the ``tlsDisableOCSPEndpointCheck`` keyword argument and
496- URI option.
501+ Added the following keyword arguments and URI options:
502+
503+ - ``tlsDisableOCSPEndpointCheck``
504+ - ``directConnection``
497505
498506 .. versionchanged:: 3.9
499507 Added the ``retryReads`` keyword argument and URI option.
@@ -707,7 +715,8 @@ def __init__(
707715 server_selection_timeout = options .server_selection_timeout ,
708716 server_selector = options .server_selector ,
709717 heartbeat_frequency = options .heartbeat_frequency ,
710- fqdn = fqdn )
718+ fqdn = fqdn ,
719+ direct_connection = options .direct_connection )
711720
712721 self ._topology = Topology (self ._topology_settings )
713722 if connect :
0 commit comments