diff --git a/src/neo4j/_async/driver.py b/src/neo4j/_async/driver.py index 33436f59..596c95c5 100644 --- a/src/neo4j/_async/driver.py +++ b/src/neo4j/_async/driver.py @@ -381,6 +381,15 @@ def neo4j_driver(cls, *targets, routing_context=None, **config): """ Create a driver for routing-capable Neo4j service access that uses socket I/O and thread-based concurrency. """ + + # TODO: 6.0 - adjust signature to only take one target + if len(targets) > 1: + deprecation_warn( + "Creating a routing driver with multiple targets is " + "deprecated. The driver only uses the first target anyway. " + "The method signature will change in a future release.", + ) + from .._exceptions import ( BoltHandshakeError, BoltSecurityError, diff --git a/src/neo4j/_sync/driver.py b/src/neo4j/_sync/driver.py index bcadeafd..44f38899 100644 --- a/src/neo4j/_sync/driver.py +++ b/src/neo4j/_sync/driver.py @@ -380,6 +380,15 @@ def neo4j_driver(cls, *targets, routing_context=None, **config): """ Create a driver for routing-capable Neo4j service access that uses socket I/O and thread-based concurrency. """ + + # TODO: 6.0 - adjust signature to only take one target + if len(targets) > 1: + deprecation_warn( + "Creating a routing driver with multiple targets is " + "deprecated. The driver only uses the first target anyway. " + "The method signature will change in a future release.", + ) + from .._exceptions import ( BoltHandshakeError, BoltSecurityError,