Skip to content

Commit 68cc2a7

Browse files
committed
Clean up docs & bump meta data for 6.0
1 parent 26cb4ea commit 68cc2a7

File tree

30 files changed

+242
-242
lines changed

30 files changed

+242
-242
lines changed

README.rst

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@ Neo4j Bolt Driver for Python
44

55
This repository contains the official Neo4j driver for Python.
66

7-
Starting with 5.0, the Neo4j Drivers will be moving to a monthly release
8-
cadence. A minor version will be released on the last Friday of each month so
9-
as to maintain versioning consistency with the core product (Neo4j DBMS) which
10-
has also moved to a monthly cadence.
7+
Driver upgrades within a major version will never contain breaking API changes.
118

12-
As a policy, patch versions will not be released except on rare occasions. Bug
13-
fixes and updates will go into the latest minor version and users should
14-
upgrade to that. Driver upgrades within a major version will never contain
15-
breaking API changes.
16-
17-
See also: https://neo4j.com/developer/kb/neo4j-supported-versions/
9+
For version compatibility with Neo4j server, please refer to:
10+
https://neo4j.com/developer/kb/neo4j-supported-versions/
1811

1912
+ Python 3.13 supported.
2013
+ Python 3.12 supported.

docs/source/api.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ Each supported scheme maps to a particular :class:`neo4j.Driver` subclass that i
8282
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
8383
| URI Scheme | Driver Object and Setting |
8484
+========================+=======================================================================================================================================+
85-
| bolt | :ref:`bolt-driver-ref` with no encryption. |
85+
| bolt | :ref:`bolt-driver-ref` with no encryption or with custom encryption configuration, see :ref:`driver-configuration-ref`. |
8686
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
8787
| bolt+ssc | :ref:`bolt-driver-ref` with encryption (accepts self signed certificates). |
8888
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
8989
| bolt+s | :ref:`bolt-driver-ref` with encryption (accepts only certificates signed by a certificate authority), full certificate checks. |
9090
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
91-
| neo4j | :ref:`neo4j-driver-ref` with no encryption. |
91+
| neo4j | :ref:`neo4j-driver-ref` with no encryption or with custom encryption configuration, see :ref:`driver-configuration-ref`. |
9292
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
9393
| neo4j+ssc | :ref:`neo4j-driver-ref` with encryption (accepts self signed certificates). |
9494
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
@@ -799,9 +799,8 @@ For example:
799799
self.driver.close()
800800
801801
Connection details held by the :class:`neo4j.Driver` are immutable.
802-
Therefore if, for example, a password is changed, a replacement :class:`neo4j.Driver` object must be created.
803-
More than one :class:`.Driver` may be required if connections to multiple remotes, or connections as multiple users, are required,
804-
unless when using impersonation (:ref:`impersonated-user-ref`).
802+
Therefore if, for example, the server URI is changed, a replacement :class:`neo4j.Driver` object must be created.
803+
More than one :class:`.Driver` may be required if connections to multiple remotes.
805804

806805
:class:`neo4j.Driver` objects are thread-safe but cannot be shared across processes.
807806
Therefore, ``multithreading`` should generally be preferred over ``multiprocessing`` for parallel database access.
@@ -959,7 +958,8 @@ more information.
959958
:class:`neo4j.Bookmarks` object instead.
960959

961960
.. versionchanged:: 6.0
962-
Only accepts :class:`neo4j.Bookmarks` objects or :data:`None`.
961+
No longer accepts an iterable of strings.
962+
Pass a :class:`neo4j.Bookmarks` objects or :data:`None` instead.
963963

964964

965965
.. _database-ref:
@@ -980,7 +980,7 @@ Name of the database to query.
980980
straightforward way and potentially simplifies driver logic as well as
981981
reduces network communication resulting in better performance.
982982

983-
Usage of Cypher clauses like `USE` is not a replacement for this option.
983+
Usage of Cypher clauses like ``USE`` is not a replacement for this option.
984984
The driver does not parse any Cypher.
985985

986986
When no explicit name is set, the driver behavior depends on the connection
@@ -1378,7 +1378,7 @@ Example:
13781378
13791379
.. _managed-transactions-ref:
13801380

1381-
Managed Transactions (`transaction functions`)
1381+
Managed Transactions (*transaction functions*)
13821382
==============================================
13831383
Transaction functions are the most powerful form of transaction, providing access mode override and retry capabilities.
13841384

@@ -2001,7 +2001,7 @@ Server-side errors
20012001

20022002
.. autoexception:: neo4j.exceptions.Neo4jError()
20032003
:show-inheritance:
2004-
:members: message, code, is_retriable, is_retryable
2004+
:members: message, code, is_retryable
20052005

20062006
.. autoexception:: neo4j.exceptions.ClientError()
20072007
:show-inheritance:

docs/source/async_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ Example:
837837
.. _async-managed-transactions-ref:
838838

839839

840-
Managed Transactions (`transaction functions`)
840+
Managed Transactions (*transaction functions*)
841841
==============================================
842842
Transaction functions are the most powerful form of transaction, providing access mode override and retry capabilities.
843843

docs/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Bolt protocol versions supported:
1010
.. # [bolt-version-bump] search tag when changing bolt version support
1111
1212
* Bolt 5.0 - 5.8
13-
* Bolt 4.4
1413

1514
See https://7687.org/bolt-compatibility/ for what Neo4j DBMS versions support which Bolt versions.
1615
See https://neo4j.com/developer/kb/neo4j-supported-versions/ for a driver-server compatibility matrix.

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ unasync==0.5.0
1010
pre-commit>=4.2.0
1111
isort>=6.0.1
1212
mypy>=1.15.0
13-
typing-extensions>=4.13.2
13+
#typing-extensions>=4.13.2
1414
types-pytz>=2025.2.0.20250326
1515
ruff>=0.11.6
1616

src/neo4j/_async/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class AsyncPoolConfig(Config):
6767
trusted_certificates = TrustSystemCAs()
6868
# Specify how to determine the authenticity of encryption certificates
6969
# provided by the Neo4j instance on connection.
70-
# * `neo4j.TrustSystemCAs()`: Use system trust store. (default)
71-
# * `neo4j.TrustAll()`: Trust any certificate.
72-
# * `neo4j.TrustCustomCAs("<path>", ...)`:
70+
# * ``neo4j.TrustSystemCAs()``: Use system trust store. (default)
71+
# * ``neo4j.TrustAll()``: Trust any certificate.
72+
# * ``neo4j.TrustCustomCAs("<path>", ...)``:
7373
# Trust the specified certificate(s).
7474

7575
#: Certificate to use for mTLS as 2nd authentication factor.
@@ -78,7 +78,7 @@ class AsyncPoolConfig(Config):
7878
#: Custom SSL context to use for wrapping sockets
7979
ssl_context = None
8080
# Use any custom SSL context to wrap sockets.
81-
# Overwrites `trusted_certificates` and `encrypted`.
81+
# Overwrites ``trusted_certificates`` and ``encrypted``.
8282
# The use of this option is strongly discouraged.
8383

8484
#: User Agent (Python Driver Specific)

src/neo4j/_async/driver.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -306,18 +306,18 @@ def bookmark_manager(
306306
driver = neo4j.AsyncGraphDatabase.driver(...)
307307
bookmark_manager = neo4j.AsyncGraphDatabase.bookmark_manager(...)
308308
309-
async with driver.session(
310-
bookmark_manager=bookmark_manager
311-
) as session1:
312-
async with driver.session(
309+
async with (
310+
driver.session(bookmark_manager=bookmark_manager) as session1,
311+
driver.session(
313312
bookmark_manager=bookmark_manager,
314-
access_mode=neo4j.READ_ACCESS
315-
) as session2:
316-
result1 = await session1.run("<WRITE_QUERY>")
317-
await result1.consume()
318-
# READ_QUERY is guaranteed to see what WRITE_QUERY wrote.
319-
result2 = await session2.run("<READ_QUERY>")
320-
await result2.consume()
313+
default_access_mode=neo4j.READ_ACCESS,
314+
) as session2,
315+
):
316+
result1 = await session1.run("<WRITE_QUERY>")
317+
await result1.consume()
318+
# READ_QUERY is guaranteed to see what WRITE_QUERY wrote.
319+
result2 = await session2.run("<READ_QUERY>")
320+
await result2.consume()
321321
322322
This is a very contrived example, and in this particular case, having
323323
both queries in the same session has the exact same effect and might

src/neo4j/_async/io/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"""
1818
Low-level functionality required for speaking Bolt.
1919
20-
It is not intended to be used directly by driver users. Instead, the `session`
21-
module provides the main user-facing abstractions.
20+
It is not intended to be used directly by driver users. Instead, the
21+
``session`` module provides the main user-facing abstractions.
2222
"""
2323

2424
__all__ = [

src/neo4j/_async/io/_pool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ async def update_routing_table(
965965
:param acquisition_timeout: connection acquisition timeout
966966
:param database_callback: A callback function that will be called with
967967
the database name as only argument when a new routing table has
968-
been acquired. This database name might different from `database`
968+
been acquired. This database name might different from ``database``
969969
if that was None and the underlying protocol supports reporting
970970
back the actual database.
971971
@@ -1064,7 +1064,8 @@ async def ensure_routing_table_is_fresh(
10641064
10651065
This method is thread-safe.
10661066
1067-
:returns: `True` if an update was required, `False` otherwise.
1067+
:returns:
1068+
:data:`True` if an update was required, :data:`False` otherwise.
10681069
"""
10691070
async with self.refresh_lock:
10701071
for database_ in list(self.routing_tables.keys()):

src/neo4j/_async/work/result.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ async def _attach(self):
428428

429429
async def _buffer(self, n=None):
430430
"""
431-
Try to fill `self._record_buffer` with n records.
431+
Try to fill ``self._record_buffer`` with n records.
432432
433433
Might end up with more records in the buffer if the fetch size makes it
434434
overshoot.
@@ -582,9 +582,10 @@ async def single(self, strict: bool = False) -> Record | None:
582582
emit a warning and return the first record.
583583
584584
:param strict:
585-
If :data:`True`, raise a :exc:`.ResultNotSingleError` instead of
586-
returning :data:`None` if there is more than one record or warning
587-
if there is more than 1 record.
585+
If :data:`False`, return :data:`None` if there is no record and
586+
emit a warning if there is more than 1 record.
587+
If :data:`True`, raise a :exc:`.ResultNotSingleError` if there is
588+
not exactly one record.
588589
:data:`False` by default.
589590
:type strict: bool
590591
@@ -810,7 +811,7 @@ async def to_df(
810811
r"""
811812
Convert (the rest of) the result to a pandas DataFrame.
812813
813-
This method is only available if the `pandas` library is installed.
814+
This method is only available if the ``pandas`` library is installed.
814815
815816
::
816817
@@ -890,7 +891,7 @@ async def to_df(
890891
If :data:`False`, columns of the above types will be left as driver
891892
types (dtype ``object``).
892893
893-
:raises ImportError: if `pandas` library is not available.
894+
:raises ImportError: if the ``pandas`` library is not available.
894895
:raises ResultConsumedError: if the transaction from which this result
895896
was obtained has been closed or the Result has been explicitly
896897
consumed.

0 commit comments

Comments
 (0)