@@ -560,33 +560,28 @@ def close(self):
560560class BoltPool (IOPool ):
561561
562562 @classmethod
563- def open (cls , address , * , auth , pool_config , workspace_config , routing_context = None ):
563+ def open (cls , address , * , auth , pool_config , workspace_config ):
564564 """Create a new BoltPool
565565
566566 :param address:
567567 :param auth:
568568 :param pool_config:
569569 :param workspace_config:
570- :param routing_context:
571570 :return: BoltPool
572571 """
573572
574- if routing_context is None :
575- routing_context = {}
576- elif "address" in routing_context :
577- raise ConfigurationError ("The key 'address' is reserved for routing context." )
578- routing_context ["address" ] = str (address )
579-
580573 def opener (addr , timeout ):
581- return Bolt .open (addr , auth = auth , timeout = timeout , routing_context = routing_context , ** pool_config )
574+ return Bolt .open (
575+ addr , auth = auth , timeout = timeout , routing_context = None ,
576+ ** pool_config
577+ )
582578
583- pool = cls (opener , pool_config , workspace_config , routing_context , address )
579+ pool = cls (opener , pool_config , workspace_config , address )
584580 return pool
585581
586- def __init__ (self , opener , pool_config , workspace_config , routing_context , address ):
582+ def __init__ (self , opener , pool_config , workspace_config , address ):
587583 super (BoltPool , self ).__init__ (opener , pool_config , workspace_config )
588584 self .address = address
589- self .routing_context = routing_context
590585
591586 def __repr__ (self ):
592587 return "<{} address={!r}>" .format (self .__class__ .__name__ , self .address )
@@ -621,26 +616,25 @@ def open(cls, *addresses, auth, pool_config, workspace_config, routing_context=N
621616 routing_context ["address" ] = str (address )
622617
623618 def opener (addr , timeout ):
624- return Bolt .open (addr , auth = auth , timeout = timeout , routing_context = routing_context , ** pool_config )
619+ return Bolt .open (addr , auth = auth , timeout = timeout ,
620+ routing_context = routing_context , ** pool_config )
625621
626- pool = cls (opener , pool_config , workspace_config , routing_context , address )
622+ pool = cls (opener , pool_config , workspace_config , address )
627623 return pool
628624
629- def __init__ (self , opener , pool_config , workspace_config , routing_context , address ):
625+ def __init__ (self , opener , pool_config , workspace_config , address ):
630626 """
631627
632628 :param opener:
633629 :param pool_config:
634630 :param workspace_config:
635- :param routing_context: Dictionary with routing information
636631 :param addresses:
637632 """
638633 super (Neo4jPool , self ).__init__ (opener , pool_config , workspace_config )
639634 # Each database have a routing table, the default database is a special case.
640635 log .debug ("[#0000] C: <NEO4J POOL> routing address %r" , address )
641636 self .address = address
642637 self .routing_tables = {workspace_config .database : RoutingTable (database = workspace_config .database , routers = [address ])}
643- self .routing_context = routing_context
644638 self .refresh_lock = Lock ()
645639
646640 def __repr__ (self ):
0 commit comments