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 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() and Graph.query() methods

  • New PEP249 (DB API 2.0) compatibility

Core API

  • The ConnectionProfile class has been moved to the root py2neo package and a new ServiceProfile subclass has also been introduced, providing access to neo4j://..., neo4j+s://... and neo4j+ssc://... URIs.

  • The package has been removed. This relocates Transaction and TransactionSummary into py2neo.database, and Cursor and Record into py2neo.cypher.

  • The Procedure and ProcedureLibrary classes have been moved to py2neo.cypher.proc.

  • The py2neo.database package is now fully documented under the root py2neo package.

  • The module has been collapsed directly into the Transaction 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() and Transaction.rollback() methods have been deprecated. The Graph.commit() and Graph.rollback() methods should be used instead.

  • The Transaction class can no longer be used in a with block. Use explicit begin/commit calls or a Graph.update() call instead.

  • Big stability improvements for multithreaded usage.

  • The Cursor.stats(), Cursor.plan() and Cursor.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

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. The Table 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.