Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.13']
python-version: ['3.10', '3.14']
neo4j-tag:
- 'latest'
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
steps:
- name: Free up disk space (ubuntu-latest)
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12', '3.13']
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14']
neo4j-tag:
- 'community'
- 'enterprise'
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Next

## Added

- Support for Python 3.14
- Support for version 6.0.0 of the Neo4j Python driver

### Changed

- Switched project/dependency management from Poetry to uv.
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ A list of Neo4j GenAI-related features can also be found at [Neo4j GenAI Ecosyst

| Version | Supported? |
|---------|-----------:|
| 3.14 | ✓ |
| 3.13 | ✓ |
| 3.12 | ✓ |
| 3.11 | ✓ |
| 3.10 | ✓ |
| 3.9 | ✗ |
| 3.8 | ✗ |

## 📦 Installation

Expand Down Expand Up @@ -60,6 +59,10 @@ the extra dependencies described below:
- **pinecone**: store vectors in Pinecone
- **qdrant**: store vectors in Qdrant
- **experimental**: experimental features mainly related to the Knowledge Graph creation pipelines.
- **nlp**: installs spaCy for NLP pipelines, used by `SpaCySemanticMatchResolver` in the experimental KG builder components.
- **fuzzy-matching**: installs RapidFuzz, used by `FuzzyMatchResolver` in the experimental KG builder components.

> Note: The **`nlp`** extra is currently **not supported on Python 3.14** due to an upstream spaCy import-time issue ([spaCy #13895](https://github.com/explosion/spaCy/issues/13895)). Use Python **3.13 or earlier** for spaCy-based features until that is resolved upstream.


Install package with optional dependencies with (for instance):
Expand Down
5 changes: 5 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Neo4j versions supported:

Python versions supported:

* Python 3.14
* Python 3.13
* Python 3.12
* Python 3.11
Expand Down Expand Up @@ -101,6 +102,10 @@ List of extra dependencies:
- **nlp**: installs spaCy for nlp pipelines, used by `SpaCySemanticMatchResolver` component from the Knowledge Graph creation pipelines.
- **fuzzy-matching**: installs **rapidfuzz** to fuzzy matching using string similarity, used by `FuzzyMatchResolver` component from the Knowledge Graph creation pipelines.

.. note::

The **`nlp`** extra (spaCy) is currently **not supported on Python 3.14** due to an upstream spaCy import-time issue (see `spaCy #13895 <https://github.com/explosion/spaCy/issues/13895>`_). Use Python **3.13 or earlier** for spaCy-based features until that is resolved upstream.

********
Examples
********
Expand Down
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ authors = [
]
license = {text = "Apache License, Version 2.0"}
readme = "README.md"
requires-python = ">=3.10.0,<3.14"
requires-python = ">=3.10.0,<3.15"
dependencies = [
"neo4j>=5.17.0,<6.0.0",
"neo4j>=5.17.0,<7.0.0",
"pydantic>=2.6.3,<3.0.0",
"fsspec>=2024.9.0,<2025.0.0",
"pypdf>=6.0.0,<7.0.0",
"json-repair>=0.44.1,<0.45.0",
"pyyaml>=6.0.2,<7.0.0",
"types-pyyaml>=6.0.12.20240917,<7.0.0",
"numpy>=2.0.0,<3.0.0; python_version >= '3.9' and python_version < '3.13'",
"numpy>=2.1.0,<3.0.0; python_version >= '3.13' and python_version < '3.14'",
"numpy>=2.1.0,<3.0.0; python_version >= '3.13' and python_version < '3.15'",
"scipy>=1.13.0,<2.0.0; python_version >= '3.9' and python_version < '3.13'",
"scipy>=1.15.0,<2.0.0; python_version >= '3.13' and python_version < '3.14'",
"scipy>=1.15.0,<2.0.0; python_version >= '3.13' and python_version < '3.15'",
"tenacity>=9.1.2,<10.0.0",
]

Expand Down Expand Up @@ -63,7 +63,10 @@ examples = [
"langchain-openai>=0.2.2,<0.3.0",
"langchain-huggingface>=0.1.0,<0.2.0",
]
nlp = ["spacy==3.8.7"]
# NOTE: spaCy currently has a Python 3.14 import-time failure via its pydantic v1 path
# (see https://github.com/explosion/spaCy/issues/13895). Until upstream resolves this,
# only advertise/install the `nlp` extra on Python <3.14.
nlp = ["spacy==3.8.7; python_version < '3.14'"]
fuzzy-matching = ["rapidfuzz>=3.12.2,<4.0.0"]

[dependency-groups]
Expand Down
13 changes: 7 additions & 6 deletions src/neo4j_graphrag/experimental/components/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from spacy.language import Language

IS_SPACY_INSTALLED = True
except ImportError:
except Exception:
IS_SPACY_INSTALLED = False


Expand Down Expand Up @@ -353,11 +353,6 @@ def __init__(
auto_download_spacy_model: bool = True,
neo4j_database: Optional[str] = None,
) -> None:
if not IS_SPACY_INSTALLED:
raise ImportError("""`spacy` python module needs to be installed to use
the SpaCySemanticMatchResolver. Install it with:
`pip install "neo4j-graphrag[nlp]"`
""")
super().__init__(
driver,
filter_query,
Expand Down Expand Up @@ -408,6 +403,12 @@ def _load_or_download_spacy_model(
If not installed, automatically download and then load it.
"""
try:
if not IS_SPACY_INSTALLED:
raise ImportError("""`spacy` python module needs to be installed to use
the SpaCySemanticMatchResolver. Install it with:
`pip install "neo4j-graphrag[nlp]"`
. SpaCy is not supported on Python 3.14 and later.
""")
return spacy.load(model_name)
except OSError as e:
if "doesn't seem to be a Python package or a valid path" in str(e):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py39, py310, py311, py312
envlist = py310, py311, py312, py313, py314


[testenv]
Expand Down
Loading