Skip to content

Unify connection_acquisition_timeout behavior #1215

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

Merged
merged 5 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fixup! Unify connection_acquisition_timeout behavior
  • Loading branch information
robsdedude committed Jul 15, 2025
commit e5883dec499d1e7c6b6c450a4747ef9faec6645d
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki for a full changelog.
(instead of internal `neo4j._exceptions.BoltHandshakeError`).
`UnsupportedServerProduct` is now a subclass of `ServiceUnavailable` (instead of `Exception` directly).
- `connection_acquisition_timeout` configuration option
- `ValueError` on invalid values (instead of `ClientError`)
- Raise `ValueError` on invalid values (instead of `ClientError`).
- Consistently restrict the value to be strictly positive
- New `ConnectionAcquisitionTimeoutError` (subclass of `DriverError`) instead of `ClientError`
(subclass of `Neo4jError`) the timeout is exceeded.
- This improves the differentiation between `DriverError` for client-side errors and `Neo4jError` for server-side
errors.
- The option now spans *anything* required to acquire a connection.
This includes potential fetching of routing tables which in itself requires acquiring a connection.
Previously, the timeout would be restarted for such auxiliary connection acquisitions.
- `TypeError` instead of `ValueError` when passing a `Query` object to `Transaction.run`.
- `TransactionError` (subclass of `DriverError`) instead of `ClientError` (subclass of `Neo4jError`) when calling
`session.run()` while an explicit transaction is active on that session.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ it should be chosen larger than :ref:`connection-timeout-ref`.
.. versionadded:: 6.0
The setting now entails *anything* required to acquire a connection.
This includes potential fetching of routing tables which in itself requires acquiring a connection.
Previously, the timeout wold be restarted for such auxiliary connection acquisitions.
Previously, the timeout would be restarted for such auxiliary connection acquisitions.


.. _connection-timeout-ref:
Expand Down