@@ -144,7 +144,11 @@ def _parse_ssl_options(options: Mapping[str, Any]) -> tuple[Optional[SSLContext]
144144
145145
146146def _parse_pool_options (
147- username : str , password : str , database : Optional [str ], options : Mapping [str , Any ]
147+ username : str ,
148+ password : str ,
149+ database : Optional [str ],
150+ options : Mapping [str , Any ],
151+ is_sync : bool ,
148152) -> PoolOptions :
149153 """Parse connection pool options."""
150154 credentials = _parse_credentials (username , password , database , options )
@@ -183,6 +187,7 @@ def _parse_pool_options(
183187 server_api = server_api ,
184188 load_balanced = load_balanced ,
185189 credentials = credentials ,
190+ is_sync = is_sync ,
186191 )
187192
188193
@@ -195,7 +200,12 @@ class ClientOptions:
195200 """
196201
197202 def __init__ (
198- self , username : str , password : str , database : Optional [str ], options : Mapping [str , Any ]
203+ self ,
204+ username : str ,
205+ password : str ,
206+ database : Optional [str ],
207+ options : Mapping [str , Any ],
208+ is_sync : bool = True ,
199209 ):
200210 self .__options = options
201211 self .__codec_options = _parse_codec_options (options )
@@ -206,7 +216,7 @@ def __init__(
206216 self .__server_selection_timeout = options .get (
207217 "serverselectiontimeoutms" , common .SERVER_SELECTION_TIMEOUT
208218 )
209- self .__pool_options = _parse_pool_options (username , password , database , options )
219+ self .__pool_options = _parse_pool_options (username , password , database , options , is_sync )
210220 self .__read_preference = _parse_read_preference (options )
211221 self .__replica_set_name = options .get ("replicaset" )
212222 self .__write_concern = _parse_write_concern (options )
0 commit comments