1616# limitations under the License. 
1717
1818
19+ import  warnings 
20+ 
1921from  .._async_compat .util  import  AsyncUtil 
2022from  .._conf  import  (
2123    TrustAll ,
3638from  ..meta  import  (
3739    deprecation_warn ,
3840    experimental ,
41+     experimental_warn ,
42+     ExperimentalWarning ,
3943    unclosed_resource_warn ,
4044)
4145
@@ -310,22 +314,34 @@ async def verify_connectivity(self, **config):
310314            Even if this method raises an exception, the driver still needs to 
311315            be closed via :meth:`close` to free up all resources. 
312316
317+         :param config: accepts the same configuration key-word arguments as 
318+             :meth:`session`. 
319+ 
320+             .. warning:: 
321+                 All configuration key-word arguments are experimental. 
322+                 They might be changed or removed in any future version without 
323+                 prior notice. 
324+ 
313325        :raises DriverError: if the driver cannot connect to the remote. 
314326            Use the exception to further understand the cause of the 
315327            connectivity problem. 
316328
317-         .. versionchanged:: 5.0 the config parameters will be removed in 
318-             version 6 0. It has no effect starting with version 5.0. 
329+         .. versionchanged:: 5.0 
330+             The undocumented return value has been removed. 
331+             If you need information about the remote server, use 
332+             :meth:`get_server_info` instead. 
319333        """ 
320334        if  config :
321-             deprecation_warn (
322-                 "verify_connectivity() will not accept any configuration " 
323-                 "parameters starting with version 6.0." 
335+             experimental_warn (
336+                 "All configuration key-word arguments to " 
337+                 "verify_connectivity() are experimental. They might be " 
338+                 "changed or removed in any future version without prior " 
339+                 "notice." 
324340            )
341+         async  with  self .session (** config ) as  session :
342+             await  session ._get_server_info ()
325343
326-         await  self .get_server_info ()
327- 
328-     async  def  get_server_info (self ):
344+     async  def  get_server_info (self , ** config ):
329345        """Get information about the connected Neo4j server. 
330346
331347        Try to establish a working read connection to the remote server or a 
@@ -339,6 +355,14 @@ async def get_server_info(self):
339355            Even if this method raises an exception, the driver still needs to 
340356            be closed via :meth:`close` to free up all resources. 
341357
358+         :param config: accepts the same configuration key-word arguments as 
359+             :meth:`session`. 
360+ 
361+             .. warning:: 
362+                 All configuration key-word arguments are experimental. 
363+                 They might be changed or removed in any future version without 
364+                 prior notice. 
365+ 
342366        :rtype: ServerInfo 
343367
344368        :raises DriverError: if the driver cannot connect to the remote. 
@@ -347,7 +371,14 @@ async def get_server_info(self):
347371
348372        .. versionadded:: 5.0 
349373        """ 
350-         async  with  self .session () as  session :
374+         if  config :
375+             experimental_warn (
376+                 "All configuration key-word arguments to " 
377+                 "verify_connectivity() are experimental. They might be " 
378+                 "changed or removed in any future version without prior " 
379+                 "notice." 
380+             )
381+         async  with  self .session (** config ) as  session :
351382            return  await  session ._get_server_info ()
352383
353384    @experimental ("Feature support query, based on Bolt protocol version and Neo4j server version will change in the future." ) 
0 commit comments