Skip to content

Commit fe6e849

Browse files
Merge pull request #900 from neo4j-contrib/rc/6.0.0
Version 6.0.0 2025-11 * Modernize config object, using a dataclass with typing, runtime and update validation rules, and environment variables support * Fix async support of parallel transactions, using ContextVar * Introduces merge_by parameter for batch operations to customize merge behaviour (label and property keys) * Adds rel_props to batch methods, to create relationship with properties during batch operations. Thanks to @ADernild * Enforce strict cardinality check by default * Refactor internal code: core.py file is now split into smaller files for database, node, transaction * Fix object resolution for maps and lists Cypher objects, even when nested. This changes the way you can access lists in your Cypher results, see documentation for more info * Make AsyncDatabase / Database a true singleton for clarity * Remove deprecated methods (including fetch_relations & traverse_relations, replaced with traverse ; database operations like clear_neo4j_database or change_neo4j_password have been moved to db/adb singleton internal methods) * Housekeeping and bug fixes
2 parents 4d91dce + 94c51a0 commit fe6e849

File tree

122 files changed

+11041
-2937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+11041
-2937
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
18+
python-version: ["3.13", "3.12", "3.11", "3.10"]
1919
neo4j-version: ["community", "enterprise", "5.5-enterprise", "4.4-enterprise", "4.4-community"]
2020

2121
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ coverage_report/
2323
.coverage*
2424
.DS_STORE
2525
cov.xml
26+
test/data/model_diagram.*

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ repos:
44
hooks:
55
- id: isort
66
args: ["--profile", "black"]
7+
files: ^(neomodel|test)
78
- repo: https://github.com/psf/black
89
rev: 23.3.0
910
hooks:
1011
- id: black
12+
files: ^(neomodel|test)
1113
- repo: local
1214
hooks:
1315
- id: unasync

.sonarcloud.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
sonar.sources = neomodel/
22
sonar.tests = test/
3-
sonar.python.version = 3.9, 3.10, 3.11, 3.12, 3.13
3+
sonar.python.version = 3.10, 3.11, 3.12, 3.13
4+
sonar.issue.ignore.multicriteria=e1
5+
sonar.issue.ignore.multicriteria.e1.ruleKey=python:S100
6+
sonar.issue.ignore.multicriteria.e1.resourceKey=**/neomodel/config.py

Changelog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Version 6.0.0 2025-xx
2+
* Modernize config object, using a dataclass with typing, runtime and update validation rules, and environment variables support
3+
* Fix async support of parallel transactions, using ContextVar
4+
* Introduces merge_by parameter for batch operations to customize merge behaviour (label and property keys)
5+
* Adds rel_props to batch methods, to create relationship with properties during batch operations. Thanks to @ADernild
6+
* Enforce strict cardinality check by default
7+
* Refactor internal code: core.py file is now split into smaller files for database, node, transaction
8+
* Fix object resolution for maps and lists Cypher objects, even when nested. This changes the way you can access lists in your Cypher results, see documentation for more info
9+
* Make AsyncDatabase / Database a true singleton for clarity
10+
* Remove deprecated methods (including fetch_relations & traverse_relations, replaced with traverse ; database operations like clear_neo4j_database or change_neo4j_password have been moved to db/adb singleton internal methods)
11+
* Housekeeping and bug fixes
12+
113
Version 5.5.3 2025-09
214
* Fix duplicated code issue in the advanced querying methods
315
* Remove py.typed - this was a premature change, we should write stubs for full typing support first

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ GitHub repo found at <https://github.com/neo4j-contrib/neomodel/>.
2222

2323
# Requirements
2424

25+
**For neomodel releases 6.x :**
26+
27+
- Python 3.10+
28+
- Neo4j 2025.x.x, 5.x, 4.4 (LTS)
29+
- Neo4j Enterprise, Community and Aura are supported
30+
2531
**For neomodel releases 5.x :**
2632

2733
- Python 3.8+
@@ -37,27 +43,19 @@ GitHub repo found at <https://github.com/neo4j-contrib/neomodel/>.
3743
Available on
3844
[readthedocs](http://neomodel.readthedocs.org).
3945

40-
# New in 5.4.0
41-
42-
This version adds many new features, expanding neomodel's querying capabilities. Those features were kindly contributed back by the [OpenStudyBuilder team](https://openstudybuilder.com/). A VERY special thanks to [@tonioo](https://github.com/tonioo) for the integration work.
43-
44-
There are too many new capabilities here, so I advise you to start by looking at the full summary example in the [Getting Started guide](https://neomodel.readthedocs.io/en/latest/getting_started.html#full-example). It will then point you to the various relevant sections.
46+
# New in 6.0.0
4547

46-
We also validated support for [Python 3.13](https://docs.python.org/3/whatsnew/3.13.html).
48+
From now on, neomodel will use **SemVer (major.minor.patch)** for versioning.
4749

48-
# New in 5.3.0
50+
This version introduces a modern configuration system, using a dataclass with typing, runtime and update validation rules, and environment variables support.
51+
See the [documentation](https://neomodel.readthedocs.io/en/latest/configuration.html) section for more details.
4952

50-
neomodel now supports asynchronous programming, thanks to the [Neo4j driver async API](https://neo4j.com/docs/api/python-driver/current/async_api.html). The [documentation](http://neomodel.readthedocs.org) has been updated accordingly, with an updated getting started section, and some specific documentation for the async API.
53+
[Semantic Indexes](https://neomodel.readthedocs.io/en/latest/semantic_indexes.html#) (Vector and Full-text) are now natively supported so you do not have to use a custom Cypher query. Special thanks to @greengori11a for this.
5154

52-
# Breaking changes in 5.3.0
55+
### Breaking changes
5356

54-
- config.AUTO_INSTALL_LABELS has been removed. Please use the `neomodel_install_labels` script instead. _Note : this is because of the addition of async, but also because it might lead to uncontrolled creation of indexes/constraints. The script makes you more in control of said creation._
55-
- The Database class has been moved into neomodel.sync_.core - and a new AsyncDatabase introduced into neomodel.async_.core
56-
- Based on Python version [status](https://devguide.python.org/versions/),
57-
neomodel will be dropping support for Python 3.7 in an upcoming release
58-
(5.3 or later). _This does not mean neomodel will stop working on Python 3.7, but
59-
it will no longer be tested against it_
60-
- Some standalone methods have been refactored into the Database() class. Check the [documentation](http://neomodel.readthedocs.org) for a full list.
57+
* List object resolution from Cypher was creating "2-depth" lists for no apparent reason. This release fixes this so that, for example "RETURN collect(node)" will return the nodes directly as a list in the result. In other words, you can extract this list at `results[0][0]` instead of `results[0][0][0]`
58+
* See more breaking changes in the [documentation](http://neomodel.readthedocs.org)
6159

6260
# Installation
6361

@@ -84,7 +82,7 @@ You can find some performance tests made using Locust [in this repo](https://git
8482
Two learnings from this :
8583

8684
* The wrapping of the driver made by neomodel is very thin performance-wise : it does not add a lot of overhead ;
87-
* When used in a concurrent fashion, async neomodel is faster than concurrent sync neomodel, and a lot of faster than serial queries.
85+
* When used in a concurrent fashion, async neomodel is faster than concurrent sync neomodel, and a lot faster than serial queries.
8886

8987
# Contributing
9088

0 commit comments

Comments
 (0)