Skip to content

Commit 5db5e08

Browse files
committed
Remove unused attr routing_context from Pool classes
1 parent 6329cb1 commit 5db5e08

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

neo4j/io/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -563,20 +563,21 @@ def open(cls, address, *, auth, pool_config, workspace_config):
563563
:param auth:
564564
:param pool_config:
565565
:param workspace_config:
566-
:param routing_context:
567566
:return: BoltPool
568567
"""
569568

570569
def opener(addr, timeout):
571-
return Bolt.open(addr, auth=auth, timeout=timeout, routing_context=None, **pool_config)
570+
return Bolt.open(
571+
addr, auth=auth, timeout=timeout, routing_context=None,
572+
**pool_config
573+
)
572574

573575
pool = cls(opener, pool_config, workspace_config, address)
574576
return pool
575577

576578
def __init__(self, opener, pool_config, workspace_config, address):
577579
super(BoltPool, self).__init__(opener, pool_config, workspace_config)
578580
self.address = address
579-
self.routing_context = None
580581

581582
def __repr__(self):
582583
return "<{} address={!r}>".format(self.__class__.__name__, self.address)
@@ -610,26 +611,25 @@ def open(cls, *addresses, auth, pool_config, workspace_config, routing_context=N
610611
routing_context["address"] = str(address)
611612

612613
def opener(addr, timeout):
613-
return Bolt.open(addr, auth=auth, timeout=timeout, routing_context=routing_context, **pool_config)
614+
return Bolt.open(addr, auth=auth, timeout=timeout,
615+
routing_context=routing_context, **pool_config)
614616

615-
pool = cls(opener, pool_config, workspace_config, routing_context, address)
617+
pool = cls(opener, pool_config, workspace_config, address)
616618
return pool
617619

618-
def __init__(self, opener, pool_config, workspace_config, routing_context, address):
620+
def __init__(self, opener, pool_config, workspace_config, address):
619621
"""
620622
621623
:param opener:
622624
:param pool_config:
623625
:param workspace_config:
624-
:param routing_context: Dictionary with routing information
625626
:param addresses:
626627
"""
627628
super(Neo4jPool, self).__init__(opener, pool_config, workspace_config)
628629
# Each database have a routing table, the default database is a special case.
629630
log.debug("[#0000] C: <NEO4J POOL> routing address %r", address)
630631
self.address = address
631632
self.routing_tables = {workspace_config.database: RoutingTable(database=workspace_config.database, routers=[address])}
632-
self.routing_context = routing_context
633633
self.refresh_lock = Lock()
634634

635635
def __repr__(self):

0 commit comments

Comments
 (0)