Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 51a63d9

Browse files
Merge pull request #1205 from robsdedude/stabilize-debug-mode
Stabilize driver debug mode
2 parents 96a9c55 + 53d5014 commit 51a63d9

File tree

8 files changed

+13
-44
lines changed

8 files changed

+13
-44
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.

‎testkitbackend/_async/requests.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
AsyncClientCertificateProvider,
3838
ExpiringAuth,
3939
)
40-
from neo4j.warnings import PreviewWarning
4140

4241
from .. import (
4342
fromtestkit,
@@ -219,12 +218,6 @@ async def new_driver(backend, data):
219218
kwargs["trusted_certificates"] = neo4j.TrustCustomCAs(*cert_paths)
220219
fromtestkit.set_notifications_config(kwargs, data)
221220

222-
expected_warnings.append(
223-
(
224-
PreviewWarning,
225-
r"notification warnings are a preview feature\.",
226-
)
227-
)
228221
with warnings_check(expected_warnings):
229222
driver = neo4j.AsyncGraphDatabase.driver(
230223
data["uri"],

‎testkitbackend/_sync/requests.py

Lines changed: 0 additions & 7 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)

AltStyle によって変換されたページ (->オリジナル) /