@@ -134,12 +134,13 @@ def protocol_handlers(cls, protocol_version=None):
134134
135135 # Carry out Bolt subclass imports locally to avoid circular dependency issues.
136136 from neo4j .io ._bolt3 import Bolt3
137- from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1
137+ from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1 , Bolt4x2
138138
139139 handlers = {
140140 Bolt3 .PROTOCOL_VERSION : Bolt3 ,
141141 Bolt4x0 .PROTOCOL_VERSION : Bolt4x0 ,
142142 Bolt4x1 .PROTOCOL_VERSION : Bolt4x1 ,
143+ Bolt4x2 .PROTOCOL_VERSION : Bolt4x2 ,
143144 }
144145
145146 if protocol_version is None :
@@ -209,6 +210,10 @@ def open(cls, address, *, auth=None, timeout=None, routing_context=None, **pool_
209210 # Carry out Bolt subclass imports locally to avoid circular dependency issues.
210211 from neo4j .io ._bolt4 import Bolt4x1
211212 connection = Bolt4x1 (address , s , pool_config .max_connection_lifetime , auth = auth , user_agent = pool_config .user_agent , routing_context = routing_context )
213+ elif pool_config .protocol_version == (4 , 2 ):
214+ # Carry out Bolt subclass imports locally to avoid circular dependency issues.
215+ from neo4j .io ._bolt4 import Bolt4x2
216+ connection = Bolt4x2 (address , s , pool_config .max_connection_lifetime , auth = auth , user_agent = pool_config .user_agent , routing_context = routing_context )
212217 else :
213218 log .debug ("[#%04X] S: <CLOSE>" , s .getpeername ()[1 ])
214219 s .shutdown (SHUT_RDWR )
@@ -672,7 +677,7 @@ def fetch_routing_info(self, *, address, timeout, database):
672677
673678 # Carry out Bolt subclass imports locally to avoid circular dependency issues.
674679 from neo4j .io ._bolt3 import Bolt3
675- from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1
680+ from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1 , Bolt4x2
676681
677682 from neo4j .api import (
678683 SYSTEM_DATABASE ,
0 commit comments