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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog.
- Consistently check the value (also for non-routing drivers)
- `neo4j.exceptions.UnsupportedServerProduct` if no common bolt protocol version could be negotiated with the server
(instead of internal `neo4j._exceptions.BoltHandshakeError`).
`UnsupportedServerProduct` is now a subclass of `ServiceUnavailable` (instead of `Exception` directly).
`UnsupportedServerProduct` is now a subclass of `ConfigurationError` (instead of `Exception` directly).
- `connection_acquisition_timeout` configuration option
- Raise `ValueError` on invalid values (instead of `ClientError`).
- Consistently restrict the value to be strictly positive
Expand Down Expand Up @@ -71,7 +71,7 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog.
If you were calling it directly, please use `Record.__getitem__(slice(...))` or simply `record[...]` instead.
- Bookmarks
- Remove deprecated class `neo4j.Bookmark` in favor of `neo4j.Bookmarks`.
- Remove deprecated class `session.last_bookmark()` in favor of `last_bookmarks()`.
- Remove deprecated method `session.last_bookmark()` in favor of `last_bookmarks()`.
- Deprecate passing raw sting bookmarks as `initial_bookmarks` to `GraphDatabase.bookmark_manager()`.
Use a `neo4j.Bookmarks` object instead.
- `Driver.session()` no longer accepts raw string bookmarks as `bookmarks` argument.
Expand Down
10 changes: 5 additions & 5 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2084,8 +2084,6 @@ Client-side errors

* :class:`neo4j.exceptions.ReadServiceUnavailable`

* :class:`neo4j.exceptions.UnsupportedServerProduct`

* :class:`neo4j.exceptions.IncompleteCommit`

* :class:`neo4j.exceptions.ConfigurationError`
Expand All @@ -2094,6 +2092,8 @@ Client-side errors

* :class:`neo4j.exceptions.CertificateConfigurationError`

* :class:`neo4j.exceptions.UnsupportedServerProduct`

* :class:`neo4j.exceptions.ConnectionPoolError`

* :class:`neo4j.exceptions.ConnectionAcquisitionTimeoutError`
Expand Down Expand Up @@ -2145,9 +2145,6 @@ Client-side errors
.. autoexception:: neo4j.exceptions.ReadServiceUnavailable()
:show-inheritance:

.. autoexception:: neo4j.exceptions.UnsupportedServerProduct()
:show-inheritance:

.. autoexception:: neo4j.exceptions.IncompleteCommit()
:show-inheritance:

Expand All @@ -2160,6 +2157,9 @@ Client-side errors
.. autoexception:: neo4j.exceptions.CertificateConfigurationError()
:show-inheritance:

.. autoexception:: neo4j.exceptions.UnsupportedServerProduct()
:show-inheritance:



Internal Driver Errors
Expand Down
30 changes: 15 additions & 15 deletions src/neo4j/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
+ RoutingServiceUnavailable
+ WriteServiceUnavailable
+ ReadServiceUnavailable
+ UnsupportedServerProduct
+ IncompleteCommit
+ ConfigurationError
+ AuthConfigurationError
+ CertificateConfigurationError
+ UnsupportedServerProduct
+ ConnectionPoolError
+ ConnectionAcquisitionTimeoutError
"""
Expand Down Expand Up @@ -1028,20 +1028,6 @@ class ReadServiceUnavailable(ServiceUnavailable):
"""Raised when no read service is available."""


# DriverError > ServiceUnavailable > UnsupportedServerProduct
class UnsupportedServerProduct(ServiceUnavailable):
"""
Raised when an unsupported server product is detected.

.. versionchanged:: 6.0
This exception is now a subclass of :class:`ServiceUnavailable`.
Before it was a subclass of :class:`Exception`.
"""

def __init__(self, *args: object) -> None:
super().__init__(*args)


# DriverError > ServiceUnavailable > IncompleteCommit
class IncompleteCommit(ServiceUnavailable):
"""
Expand Down Expand Up @@ -1085,6 +1071,20 @@ class CertificateConfigurationError(ConfigurationError):
"""Raised when there is an error with the certificate configuration."""


# DriverError > ConfigurationError > UnsupportedServerProduct
class UnsupportedServerProduct(ConfigurationError):
"""
Raised when an unsupported server product is detected.

.. versionchanged:: 6.0
This exception is now a subclass of :class:`ConfigurationError`.
Before it was a subclass of :class:`Exception`.
"""

def __init__(self, *args: object) -> None:
super().__init__(*args)


# DriverError > ConnectionPoolError
class ConnectionPoolError(DriverError):
"""Raised when the connection pool encounters an error."""
Expand Down