@@ -134,12 +134,13 @@ def protocol_handlers(cls, protocol_version=None):
134
134
135
135
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
136
136
from neo4j .io ._bolt3 import Bolt3
137
- from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1
137
+ from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1 , Bolt4x2
138
138
139
139
handlers = {
140
140
Bolt3 .PROTOCOL_VERSION : Bolt3 ,
141
141
Bolt4x0 .PROTOCOL_VERSION : Bolt4x0 ,
142
142
Bolt4x1 .PROTOCOL_VERSION : Bolt4x1 ,
143
+ Bolt4x2 .PROTOCOL_VERSION : Bolt4x2 ,
143
144
}
144
145
145
146
if protocol_version is None :
@@ -209,6 +210,10 @@ def open(cls, address, *, auth=None, timeout=None, routing_context=None, **pool_
209
210
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
210
211
from neo4j .io ._bolt4 import Bolt4x1
211
212
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 )
212
217
else :
213
218
log .debug ("[#%04X] S: <CLOSE>" , s .getpeername ()[1 ])
214
219
s .shutdown (SHUT_RDWR )
@@ -672,7 +677,7 @@ def fetch_routing_info(self, *, address, timeout, database):
672
677
673
678
# Carry out Bolt subclass imports locally to avoid circular dependency issues.
674
679
from neo4j .io ._bolt3 import Bolt3
675
- from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1
680
+ from neo4j .io ._bolt4 import Bolt4x0 , Bolt4x1 , Bolt4x2
676
681
677
682
from neo4j .api import (
678
683
SYSTEM_DATABASE ,
0 commit comments