Release notes¶
Version 2021.2¶
General (2021.2)¶
Support for Python 3.4 has been dropped
Command line functionality has been moved to the separate ipy2neo project
Data type and PackStream functionality has been moved to the separate interchange project
Various experimental modules removed from project
OGM (2021.2)¶
Allow Repository.save for iterables
RelatedObjects.add now returns number of additions performed
Added default constructor for Model objects
Integration (2021.2)¶
Moved third-party library integrations to py2neo.integration namespace
Bolt (2021.2)¶
Record content is no longer logged
HTTP (2021.2)¶
Routing support has been added for HTTP connections
Improved HTTP connection housekeeping
Version 2021.1¶
Highlights (2021.1)¶
Full support for routing
Full support for Neo4j 4.3
Big stability improvements for multithreaded usage.
Retries built into
Graph.update()
andGraph.query()
methodsNew PEP249 (DB API 2.0) compatibility
Core API¶
The
ConnectionProfile
class has been moved to the rootpy2neo
package and a newServiceProfile
subclass has also been introduced, providing access toneo4j://...
,neo4j+s://...
andneo4j+ssc://...
URIs.The
py2neo.database.work
package has been removed. This relocatesTransaction
andTransactionSummary
intopy2neo.database
, andCursor
andRecord
intopy2neo.cypher
.The
Procedure
andProcedureLibrary
classes have been moved topy2neo.cypher.proc
.The
py2neo.database
package is now fully documented under the rootpy2neo
package.The
py2neo.data.operations
module has been collapsed directly into theTransaction
class. So instead of, for example, create_subgraph(tx, subgraph) you should now use tx.create(subgraph) directly.A new
Graph.update()
method has been added. This provides execution with retries for Cypher statements that carry out updates (writes), but which do not return results. This method also accepts transaction functions as well as individual queries.A new
Graph.query()
method has been added. This provides execution with retries for Cypher statements that carry out readonly queries, returning results.The
Transaction.commit()
andTransaction.rollback()
methods have been deprecated. TheGraph.commit()
andGraph.rollback()
methods should be used instead.The
Transaction
class can no longer be used in awith
block. Use explicit begin/commit calls or aGraph.update()
call instead.Big stability improvements for multithreaded usage.
The
Cursor.stats()
,Cursor.plan()
andCursor.summary()
methods now return simple dictionaries instead of custom classes.The
Cursor.profile
attribute has been introduced to provide access to the connection profile under which the originating query was executed.
Error handling¶
The py2neo error hierarchy has been given a major overhaul, with most surface-level errors now moved to the
py2neo.errors
module.ClientError
,ClientError
andClientError
are now subclasses ofNeo4jError
.ServiceUnavailable
andWriteServiceUnavailable
are now raised whenever the entire database service becomes unavailable, or when the service becomes limited to read-only, respectively.
New modules and packages¶
A new
py2neo.export
package has been introduced to house all bulk export functionality as well as exports to third party formats. TheTable
class has also been moved to this package.A new
py2neo.pep249
module has been added, which introduces an interface compatible with the Python DB API 2.0.
Command line tooling¶
Added multi-database support to command line console.
Neo4j support¶
Basic support for Bolt 4.3 has been added, although not all optimisations are yet in place.
Updated Cypher lexer to add support for Cypher 4.2.
Routing support has now matured from experimental to full, allowing Aura and other Neo4j cluster deployments to be used from py2neo.
Requirements updates¶
The project requirements have been adjusted to allow Prompt Toolkit 3.x to be used when using Python 3.5 or above. Previously, this was limited to Prompt Toolkit 2.x for all Python versions, which caused knock-on dependency issues.