-
Notifications
You must be signed in to change notification settings - Fork 203
Description
Issue Description:
When attempting to use the connection_timeout parameter with session() in Neo4j Python driver 5.28.1, an error is thrown despite this parameter being documented in previous versions:
with driver.session(connection_timeout=5) as session:
This results in the following exception:
neo4j.exceptions.ConfigurationError: Unexpected config keys: connection_timeout
I'm unable to find updated documentation on how to set connection timeouts for the Python driver in version 5.x. This parameter has been removed or renamed, but the documentation hasn't been updated to reflect this change.
Reproduction Steps
Install Neo4j Python driver 5.28.1
Connect to a Neo4j database with:
pythonfrom neo4j import GraphDatabase
driver = GraphDatabase.driver("bolt://neo4j:7687", auth=("neo4j", "password"))
try:
with driver.session(connection_timeout=5) as session:
result = session.run("RETURN 1 as test")
print(result.single()["test"])
except Exception as e:
print(f"Error: {e}")
Expected Behavior
The session should be created with the specified connection timeout.
Actual Behavior
Exception is thrown:
neo4j.exceptions.ConfigurationError: Unexpected config keys: connection_timeout
Question
What is the correct way to set connection timeouts in Neo4j Python driver 5.x?
My Environment
Python Version: Python 3.10.12
Driver Version: neo4j 5.28.1
Server Version and Edition: Neo4j 5.26.5 Enterprise
Operating System: Docker container running on Windows 11 with WSL2 Ubuntu