- Python 3.10 support added
- Python 3.6 support has been dropped.
Result,Session, andTransactioncan no longer be imported fromneo4j.work. They should've been imported fromneo4jall along.
Remark: It's recommended to import everything needed directly fromnoe4j, not its submodules or subpackages.- Experimental pipelines feature has been removed.
- Experimental async driver has been added.
ResultSummary.server.version_infohas been removed.
UseResultSummary.server.agent,ResultSummary.server.protocol_version, or call thedbms.componentsprocedure instead.- SSL configuration options have been changed:
trusthas been deprecated and will be removed in a future release.
Usetrusted_certificatesinstead. See the API documentation for more details.
neo4j.timemodule:Duration- The constructor does not accept
subsecondsanymore.
Usemilliseconds,microseconds, ornanosecondsinstead. - The property
subsecondshas been removed.
Usenanosecondsinstead. - The property
hours_minutes_secondshas been removed.
Usehours_minutes_seconds_nanosecondsinstead. - For all math operations holds: they are element-wise on
(
months,days,nanoseconds). This affects (i.e., changes) the working of//,%,/, and*.- Years are equal to 12 months.
- Weeks are equal to 7 days.
seconds,milliseconds,microseconds, andnanosecondsare implicitly converted tonanosecondsorsecondsas fit.
- Multiplication and division allow for floats but will always result in integer values (round to nearest even).
- The constructor does not accept
Time- The constructor does not accept
floats forsecondanymore.
Usenanosecondinstead. - Ticks are now nanoseconds since midnight (
int).- The property
ticks_nshas been renamed toticks.
The oldticksis no longer supported. - The property
from_ticks_nshas been renamed tofrom_ticks.
The oldfrom_ticksis no longer supported.
- The property
- The property
secondreturns anintinstead of afloat.
Usenanosecondto get the sub-second information. - The property
hour_minute_secondhas been removed.
Usehour_minute_second_nanosecondinstead.
- The constructor does not accept
DateTime- The property
hour_minute_secondhas been removed.
Usehour_minute_second_nanosecondinstead. - The property
secondreturns anintinstead of afloat.
Usenanosecondto get the sub-second information.
- The property
- Creation of a driver with
bolt[+s[sc]]://scheme has been deprecated and will raise an error in the Future. The routing context was and will be silently ignored until then. - Bookmarks
Session.last_bookmarkwas deprecated. Its behaviour is partially incorrect and cannot be fixed without breaking its signature.
UseSession.last_bookmarksinstead.neo4j.Bookmarkwas deprecated.
Useneo4j.Bookmarksinstead.
- Deprecated closing of driver and session objects in their destructor.
This behaviour is non-deterministic as there is no guarantee that the
destructor will ever be called. A
ResourceWarningis emitted instead.
Make sure to configure Python to output those warnings when developing your application locally (it does not by default). - Result scope:
- Records of Results cannot be accessed (
peek,single,iter, ...) after their owning transaction has been closed, committed, or rolled back. Previously, this would yield undefined behavior. It now raises aResultConsumedError. - Records of Results cannot be accessed (
peek,single,iter, ...) after the Result has been consumed (Result.consume()). Previously, this would always yield no records. It now raises aResultConsumedError. - New method
Result.closed()can be used to check for this condition if necessary.
- Records of Results cannot be accessed (
driver.verify_connectivity()- All keyword arguments have been deprecated (they were experimental). They are now ignored and will be removed in a future release.
- The undocumented return value has been removed. If you need information
about the remote server, use
driver.get_server_info()instead.
- Transaction functions (a.k.a. managed transactions):
The first argument of transaction functions is now aManagedTransactionobject. It behaves exactly like a regularTransactionobject, except it does not offer thecommit,rollback,close, andclosedmethods.
Those methods would have caused a hard to interpreted error previously. Hence, they have been removed. - Deprecated Nodes' and Relationships'
idproperty (int) in favor ofelement_id(str).
This also affectsGraphobjects asgraph.nodes[...]andgraph.relationships[...]now prefers strings over integers. ServerInfo.connection_idhas been deprecated and will be removed in a future release. There is no replacement as this is considered internal information.
- Python 3.5 support has been dropped.
- Python 3.9 support added
- No driver changes have been made for Neo4j 4.2
- Routing context is now forwarded to the server for when required by server-side routing
- The package version has jumped from
1.7directly to4.0, in order to bring the version in line with Neo4j itself. - The package can now no longer be installed as
neo4j-driver; usepip install neo4jinstead. - The
neo4j.v1subpackage is now no longer available; all imports should be taken from theneo4jpackage instead. - Changed
session(access_mode)from a positional to a keyword argument - The
bolt+routingscheme is now namedneo4j - Connections are now unencrypted by default; to reproduce former behaviour, add
encrypted=Trueto Driver configuration - Removed
transaction.successflag usage pattern.
- Python 3.8 supported.
- Python 3.7 supported.
- Python 3.6 supported.
- Python 3.5 supported.
- Python 3.4 support has been dropped.
- Python 3.3 support has been dropped.
- Python 3.2 support has been dropped.
- Python 3.1 support has been dropped.
- Python 3.0 support has been dropped.
- Python 2.7 support has been dropped.