Skip to content

Commit a81ed66

Browse files
added note about breaking changes for connecting to different versions. (#415)
* added note about breaking changes for connecting to different versions. * fixed broken link to documentation * updates after feedback
1 parent f7f89bc commit a81ed66

File tree

2 files changed

+64
-5
lines changed

2 files changed

+64
-5
lines changed

README.rst

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Quick Example
3131
3232
from neo4j import GraphDatabase
3333
34-
driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "password"))
34+
driver = GraphDatabase.driver("neo4j://localhost:7687", auth=("neo4j", "password"))
3535
3636
def add_friend(tx, name, friend_name):
3737
tx.run("MERGE (a:Person {name: $name}) "
@@ -52,15 +52,71 @@ Quick Example
5252
driver.close()
5353
5454
55+
Connection Settings Breaking Change
56+
===================================
57+
58+
+ The driver’s default configuration for encrypted is now false (meaning that driver will only attempt plain text connections by default).
59+
60+
+ Connections to encrypted services (such as Neo4j Aura) should now explicitly be set to encrypted.
61+
62+
+ When encryption is explicitly enabled, the default trust mode is to trust the CAs that are trusted by operating system and use hostname verification.
63+
64+
+ This means that encrypted connections to servers holding self-signed certificates will now fail on certificate verification by default.
65+
66+
+ Using the new `neo4j+ssc` scheme will allow to connect to servers holding self-signed certificates and not use hostname verification.
67+
68+
+ The `neo4j://` scheme replaces `bolt+routing://` and can be used for both clustered and single-instance configurations with Neo4j 4.0.
69+
70+
71+
72+
See, https://neo4j.com/docs/migration-guide/4.0/upgrade-driver/#upgrade-driver-breakingchanges
73+
74+
75+
See, https://neo4j.com/docs/driver-manual/current/client-applications/#driver-connection-uris for changes in default security settings between 3.x and 4.x
76+
77+
78+
Connecting with Python Driver 4.0 against Neo4j 3.5
79+
---------------------------------------------------
80+
81+
Using the Python Driver 4.0 and connecting to Neo4j 3.5 with default connection settings for Neo4j 3.5.
82+
83+
.. code-block:: python
84+
85+
# the preferred form
86+
87+
driver = GraphDatabase.driver("neo4j+ssc://localhost:7687", auth=("neo4j", "password"))
88+
89+
# is equivalent to
90+
91+
driver = GraphDatabase.driver("neo4j://localhost:7687", auth=("neo4j", "password"), encrypted=True, trust=False)
92+
93+
94+
Connecting with Python Driver 1.7 against Neo4j 4.0
95+
---------------------------------------------------
96+
97+
Using the Python Driver 1.7 and connecting to Neo4j 4.0 with default connection settings for Neo4j 4.0.
98+
99+
.. code-block:: python
100+
101+
driver = GraphDatabase.driver("neo4j://localhost:7687", auth=("neo4j", "password"), encrypted=False)
102+
103+
104+
55105
Other Information
56106
=================
57107

58-
* `Neo4j Manual`_
59-
* `Neo4j Quick Reference Card`_
108+
* `The Neo4j Operations Manual`_
109+
* `The Neo4j Drivers Manual`_
110+
* `Python Driver API Documentation`_
111+
* `Neo4j Cypher Refcard`_
60112
* `Example Project`_
61113
* `Driver Wiki`_ (includes change logs)
114+
* `Neo4j 4.0 Migration Guide`_
62115

63-
.. _`Neo4j Manual`: https://neo4j.com/docs/developer-manual/current/
64-
.. _`Neo4j Quick Reference Card`: https://neo4j.com/docs/cypher-refcard/current/
116+
.. _`The Neo4j Operations Manual`: https://neo4j.com/docs/operations-manual/current/
117+
.. _`The Neo4j Drivers Manual`: https://neo4j.com/docs/driver-manual/current/
118+
.. _`Python Driver API Documentation`: https://neo4j.com/docs/api/python-driver/current/
119+
.. _`Neo4j Cypher Refcard`: https://neo4j.com/docs/cypher-refcard/current/
65120
.. _`Example Project`: https://github.com/neo4j-examples/movies-python-bolt
66121
.. _`Driver Wiki`: https://github.com/neo4j/neo4j-python-driver/wiki
122+
.. _`Neo4j 4.0 Migration Guide`: https://neo4j.com/docs/migration-guide/4.0/

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ pip install -r requirements.txt
1010
make -C docs html
1111
```
1212

13+
```
14+
python -m sphinx -b html docs/source build/html
15+
```

0 commit comments

Comments
 (0)