Skip to content

Commit e0a4e37

Browse files
committed
Clean up docs & bump meta data for 6.0
1 parent ff67c2a commit e0a4e37

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
@@ -68,9 +68,9 @@ class AsyncPoolConfig(Config):
6868
trusted_certificates = TrustSystemCAs()
6969
# Specify how to determine the authenticity of encryption certificates
7070
# provided by the Neo4j instance on connection.
71-
# * `neo4j.TrustSystemCAs()`: Use system trust store. (default)
72-
# * `neo4j.TrustAll()`: Trust any certificate.
73-
# * `neo4j.TrustCustomCAs("<path>", ...)`:
71+
# * ``neo4j.TrustSystemCAs()``: Use system trust store. (default)
72+
# * ``neo4j.TrustAll()``: Trust any certificate.
73+
# * ``neo4j.TrustCustomCAs("<path>", ...)``:
7474
# Trust the specified certificate(s).
7575

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

8585
#: User Agent (Python Driver Specific)

src/neo4j/_async/driver.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,18 +312,18 @@ def bookmark_manager(
312312
driver = neo4j.AsyncGraphDatabase.driver(...)
313313
bookmark_manager = neo4j.AsyncGraphDatabase.bookmark_manager(...)
314314
315-
async with driver.session(
316-
bookmark_manager=bookmark_manager
317-
) as session1:
318-
async with driver.session(
315+
async with (
316+
driver.session(bookmark_manager=bookmark_manager) as session1,
317+
driver.session(
319318
bookmark_manager=bookmark_manager,
320-
access_mode=neo4j.READ_ACCESS
321-
) as session2:
322-
result1 = await session1.run("<WRITE_QUERY>")
323-
await result1.consume()
324-
# READ_QUERY is guaranteed to see what WRITE_QUERY wrote.
325-
result2 = await session2.run("<READ_QUERY>")
326-
await result2.consume()
319+
default_access_mode=neo4j.READ_ACCESS,
320+
) as session2,
321+
):
322+
result1 = await session1.run("<WRITE_QUERY>")
323+
await result1.consume()
324+
# READ_QUERY is guaranteed to see what WRITE_QUERY wrote.
325+
result2 = await session2.run("<READ_QUERY>")
326+
await result2.consume()
327327
328328
This is a very contrived example, and in this particular case, having
329329
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
@@ -432,7 +432,7 @@ async def _attach(self):
432432

433433
async def _buffer(self, n=None):
434434
"""
435-
Try to fill `self._record_buffer` with n records.
435+
Try to fill ``self._record_buffer`` with n records.
436436
437437
Might end up with more records in the buffer if the fetch size makes it
438438
overshoot.
@@ -586,9 +586,10 @@ async def single(self, strict: bool = False) -> Record | None:
586586
emit a warning and return the first record.
587587
588588
:param strict:
589-
If :data:`True`, raise a :exc:`.ResultNotSingleError` instead of
590-
returning :data:`None` if there is more than one record or warning
591-
if there is more than 1 record.
589+
If :data:`False`, return :data:`None` if there is no record and
590+
emit a warning if there is more than 1 record.
591+
If :data:`True`, raise a :exc:`.ResultNotSingleError` if there is
592+
not exactly one record.
592593
:data:`False` by default.
593594
:type strict: bool
594595
@@ -814,7 +815,7 @@ async def to_df(
814815
r"""
815816
Convert (the rest of) the result to a pandas DataFrame.
816817
817-
This method is only available if the `pandas` library is installed.
818+
This method is only available if the ``pandas`` library is installed.
818819
819820
::
820821
@@ -894,7 +895,7 @@ async def to_df(
894895
If :data:`False`, columns of the above types will be left as driver
895896
types (dtype ``object``).
896897
897-
:raises ImportError: if `pandas` library is not available.
898+
:raises ImportError: if the ``pandas`` library is not available.
898899
:raises ResultConsumedError: if the transaction from which this result
899900
was obtained has been closed or the Result has been explicitly
900901
consumed.

0 commit comments

Comments
 (0)