Skip to content

Commit 659ed8e

Browse files
committed
Stabilize driver debug mode
* `warn_notification_severity` config option * concurrency checker
1 parent ce45656 commit 659ed8e

File tree

6 files changed

+13
-30
lines changed

6 files changed

+13
-30
lines changed

docs/source/api.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,14 +743,13 @@ Setting it to :data:`None` will be equivalent to ``OFF``, unless Python runs in
743743
(e.g., with ``python -X dev ...``) or the environment variable ``PYTHONNEO4JDEBUG`` is set, in which case the driver
744744
defaults to emitting warnings on all notification (currently equivalent to :attr:`.NotificationMinimumSeverity.INFORMATION`).
745745

746-
**This is experimental** (see :ref:`filter-warnings-ref`).
747-
It might be changed or removed any time even without prior notice.
748-
749746
:Type: :data:`None`, :class:`.NotificationMinimumSeverity`, or :class:`str`
750747
:Default: :data:`None`
751748

752749
.. versionadded:: 5.21
753750

751+
.. versionchanged:: 6.0 Stabilized from preview.
752+
754753
.. seealso:: :ref:`development-environment-ref`
755754

756755

docs/source/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ Specifically for this driver, this will:
126126
* enable :class:`DeprecationWarning`, which the driver emits if deprecated APIs are used.
127127
* enable the driver's debug mode (this can also be achieved by setting the environment variable ``PYTHONNEO4JDEBUG``):
128128

129-
* **This is experimental**.
130129
It might be changed or removed any time even without prior notice.
131130
* the driver will raise an exception if non-concurrency-safe methods are used concurrently.
132131
* the driver will emit warnings if the server sends back notification
@@ -137,6 +136,9 @@ Specifically for this driver, this will:
137136
.. versionchanged:: 5.21
138137
Added functionality to automatically emit warnings on server notifications.
139138

139+
.. versionchanged:: 6.0
140+
Stabilized from preview.
141+
140142
.. _development mode: https://docs.python.org/3/library/devmode.html
141143

142144

src/neo4j/_async/driver.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,6 @@ def driver(
251251
"is a preview feature.",
252252
stack_level=2,
253253
)
254-
if "warn_notification_severity" in config:
255-
preview_warn(
256-
"notification warnings are a preview feature.",
257-
stack_level=2,
258-
)
259254
_normalize_notifications_config(config, driver_level=True)
260255

261256
liveness_check_timeout = config.get("liveness_check_timeout")

src/neo4j/_sync/driver.py

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/unit/async_/test_driver.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -728,19 +728,15 @@ async def test_warn_notification_severity_driver_config(
728728
) -> None:
729729
if inspect.isclass(expected) and issubclass(expected, Exception):
730730
assert min_sev is not ... # makes no sense to test
731-
with (
732-
pytest.raises(expected),
733-
pytest.warns(PreviewWarning, match="notification warnings"),
734-
):
731+
with pytest.raises(expected):
735732
AsyncGraphDatabase.driver(uri, warn_notification_severity=min_sev)
736733
return
737734
if min_sev is ...:
738735
driver = AsyncGraphDatabase.driver(uri)
739736
else:
740-
with pytest.warns(PreviewWarning, match="notification warnings"):
741-
driver = AsyncGraphDatabase.driver(
742-
uri, warn_notification_severity=min_sev
743-
)
737+
driver = AsyncGraphDatabase.driver(
738+
uri, warn_notification_severity=min_sev
739+
)
744740
async with driver:
745741
if min_sev_session is ...:
746742
session = driver.session()

tests/unit/sync/test_driver.py

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)