Skip to content

Bolt 6.0 support with vector types #1214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 23 commits into
base: 6.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7086931
WIP
robsdedude May 9, 2025
2d3eeba
Merge branch '6.x' into vector-types
robsdedude Jun 3, 2025
1d575e7
Add protocol support & tests for Vectors
robsdedude Jun 3, 2025
d8447c9
Merge branch '6.x' into vector-types
robsdedude Jun 13, 2025
6eba5e6
Move vector related APIs into own module
robsdedude Jun 13, 2025
7717e68
Fix broken docs resolution
robsdedude Jun 13, 2025
8479652
Sphinx config fix
robsdedude Jun 13, 2025
b1611a8
Mute lint
robsdedude Jun 13, 2025
61daf81
Introduce enums as alternative to magic strings in vector APIs
robsdedude Jun 13, 2025
0cc2318
Fix visibility
robsdedude Jun 13, 2025
7fae51a
Docs fixes
robsdedude Jun 13, 2025
6af4df4
Add TestKit support
robsdedude Jun 23, 2025
71994fe
fixup! Introduce enums as alternative to magic strings in vector APIs
robsdedude Jun 24, 2025
ba13797
Overload Vector initializer
robsdedude Jun 24, 2025
5f26758
Fix docs formatting
robsdedude Jun 24, 2025
5fa5f2e
Simplify wording
robsdedude Jun 24, 2025
2ffc321
Improve init overloading docs + fix bytearray input + fix tests
stefano-ottolenghi Jun 25, 2025
624511a
Merge branch '6.x' into vector-types
robsdedude Jun 25, 2025
0b34ced
Use rust-ext/numpy for Vector conversions to/from native
robsdedude Jun 26, 2025
24d83d7
Improve dtype type checks
robsdedude Jun 27, 2025
6f8f070
fixup! Overload Vector initializer
robsdedude Jul 14, 2025
c556e5e
Merge branch '6.x' into vector-types
robsdedude Jul 14, 2025
2869c38
Adjust vector docs to mention server version introducing bolt 6.0
robsdedude Jul 14, 2025
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
5 changes: 4 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(os.path.join("..", "..")))
sys.path.insert(0, os.path.abspath(os.path.join("..", "..", "src")))


from neo4j import __version__ as project_version
Expand Down Expand Up @@ -345,6 +345,9 @@ def setup(app):
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
"pyarrow": ("https://arrow.apache.org/docs/", None),
}

autodoc_default_options = {
Expand Down
5 changes: 4 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Bolt protocol versions supported:

.. # [bolt-version-bump] search tag when changing bolt version support

* Bolt 6.0
* Bolt 5.0 - 5.8
* Bolt 4.4

See https://7687.org/bolt-compatibility/ for what Neo4j DBMS versions support which Bolt versions.
See https://neo4j.com/developer/kb/neo4j-supported-versions/ for a driver-server compatibility matrix.
Expand All @@ -36,6 +36,8 @@ Topics

+ :ref:`temporal-data-types`

+ :ref:`vector-data-types`

+ :ref:`breaking-changes`


Expand All @@ -47,6 +49,7 @@ Topics
async_api.rst
types/spatial.rst
types/temporal.rst
types/vector.rst
breaking_changes.rst


Expand Down
18 changes: 18 additions & 0 deletions docs/source/types/vector.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. _vector-data-types:

*****************
Vector Data Types
*****************

.. autoclass:: neo4j.vector.Vector
:members:


.. autoclass:: neo4j.vector.VectorEndian
:show-inheritance:
:members:


.. autoclass:: neo4j.vector.VectorDType
:show-inheritance:
:members:
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ Forum = "https://community.neo4j.com/c/drivers-stacks/python/"
Discord = "https://discord.com/invite/neo4j"

[project.optional-dependencies]
numpy = ["numpy >= 1.7.0, < 3.0.0"]
numpy = ["numpy >= 1.21.2, < 3.0.0"]
pandas = [
"pandas >= 1.1.0, < 3.0.0",
"numpy >= 1.7.0, < 3.0.0",
"numpy >= 1.21.2, < 3.0.0",
]
pyarrow = ["pyarrow >= 1.0.0"]
pyarrow = ["pyarrow >= 6.0.0, < 21.0.0"]


[build-system]
Expand Down Expand Up @@ -207,8 +207,9 @@ asyncio_default_fixture_loop_scope="function"
[[tool.mypy.overrides]]
module = [
"pandas.*",
"neo4j._codec.packstream._rust",
"neo4j._codec.packstream._rust.*",
"pyarrow.*",
"neo4j._rust",
"neo4j._rust.*",
]
ignore_missing_imports = true

Expand Down
1 change: 1 addition & 0 deletions src/neo4j/_async/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
_bolt3,
_bolt4,
_bolt5,
_bolt6,
)
from ._bolt import AsyncBolt
from ._common import ConnectionErrorHandler
Expand Down
1 change: 0 additions & 1 deletion src/neo4j/_async/io/_bolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ def __init_subclass__(cls: type[t.Self], **kwargs: t.Any) -> None:
cls.protocol_handlers[protocol_version] = cls
super().__init_subclass__(**kwargs)

# [bolt-version-bump] search tag when changing bolt version support
@classmethod
def get_handshake(cls) -> bytes:
"""
Expand Down
Loading