@@ -259,19 +259,20 @@ def get_handshake(cls):
259259 return b"" .join (version .to_bytes () for version in offered_versions ).ljust (16 , b"\x00 " )
260260
261261 @classmethod
262- async def ping (cls , address , * , timeout = None , ** config ):
262+ async def ping (cls , address , * , timeout = None , pool_config = None ):
263263 """ Attempt to establish a Bolt connection, returning the
264264 agreed Bolt protocol version if successful.
265265 """
266- config = PoolConfig .consume (config )
266+ if pool_config is None :
267+ pool_config = PoolConfig ()
267268 try :
268269 s , protocol_version , handshake , data = \
269270 await AsyncBoltSocket .connect (
270271 address ,
271272 timeout = timeout ,
272- custom_resolver = config .resolver ,
273- ssl_context = config .get_ssl_context (),
274- keep_alive = config .keep_alive ,
273+ custom_resolver = pool_config .resolver ,
274+ ssl_context = pool_config .get_ssl_context (),
275+ keep_alive = pool_config .keep_alive ,
275276 )
276277 except (ServiceUnavailable , SessionExpired , BoltHandshakeError ):
277278 return None
@@ -282,7 +283,7 @@ async def ping(cls, address, *, timeout=None, **config):
282283 @classmethod
283284 async def open (
284285 cls , address , * , auth = None , timeout = None , routing_context = None ,
285- ** pool_config
286+ pool_config = None
286287 ):
287288 """Open a new Bolt connection to a given server address.
288289
@@ -305,7 +306,8 @@ def time_remaining():
305306 return t if t > 0 else 0
306307
307308 t0 = perf_counter ()
308- pool_config = PoolConfig .consume (pool_config )
309+ if pool_config is None :
310+ pool_config = PoolConfig ()
309311
310312 socket_connection_timeout = pool_config .connection_timeout
311313 if socket_connection_timeout is None :
0 commit comments