diff --git a/docs/source/api.rst b/docs/source/api.rst index dbd34e9d..4cfb1512 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -743,14 +743,13 @@ Setting it to :data:`None` will be equivalent to ``OFF``, unless Python runs in (e.g., with ``python -X dev ...``) or the environment variable ``PYTHONNEO4JDEBUG`` is set, in which case the driver defaults to emitting warnings on all notification (currently equivalent to :attr:`.NotificationMinimumSeverity.INFORMATION`). -**This is experimental** (see :ref:`filter-warnings-ref`). -It might be changed or removed any time even without prior notice. - :Type: :data:`None`, :class:`.NotificationMinimumSeverity`, or :class:`str` :Default: :data:`None` .. versionadded:: 5.21 +.. versionchanged:: 6.0 Stabilized from preview. + .. seealso:: :ref:`development-environment-ref` diff --git a/docs/source/index.rst b/docs/source/index.rst index 185fbaeb..6480c91f 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -126,7 +126,6 @@ Specifically for this driver, this will: * enable :class:`DeprecationWarning`, which the driver emits if deprecated APIs are used. * enable the driver's debug mode (this can also be achieved by setting the environment variable ``PYTHONNEO4JDEBUG``): - * **This is experimental**. It might be changed or removed any time even without prior notice. * the driver will raise an exception if non-concurrency-safe methods are used concurrently. * the driver will emit warnings if the server sends back notification @@ -137,6 +136,9 @@ Specifically for this driver, this will: .. versionchanged:: 5.21 Added functionality to automatically emit warnings on server notifications. + .. versionchanged:: 6.0 + Stabilized from preview. + .. _development mode: https://docs.python.org/3/library/devmode.html diff --git a/src/neo4j/_async/driver.py b/src/neo4j/_async/driver.py index c7c0778e..5baa1b29 100644 --- a/src/neo4j/_async/driver.py +++ b/src/neo4j/_async/driver.py @@ -251,11 +251,6 @@ def driver( "is a preview feature.", stack_level=2, ) - if "warn_notification_severity" in config: - preview_warn( - "notification warnings are a preview feature.", - stack_level=2, - ) _normalize_notifications_config(config, driver_level=True) liveness_check_timeout = config.get("liveness_check_timeout") diff --git a/src/neo4j/_sync/driver.py b/src/neo4j/_sync/driver.py index c5e1ceb4..f848fdd0 100644 --- a/src/neo4j/_sync/driver.py +++ b/src/neo4j/_sync/driver.py @@ -250,11 +250,6 @@ def driver( "is a preview feature.", stack_level=2, ) - if "warn_notification_severity" in config: - preview_warn( - "notification warnings are a preview feature.", - stack_level=2, - ) _normalize_notifications_config(config, driver_level=True) liveness_check_timeout = config.get("liveness_check_timeout") diff --git a/testkitbackend/_async/requests.py b/testkitbackend/_async/requests.py index 0c3d289c..ac4c2714 100644 --- a/testkitbackend/_async/requests.py +++ b/testkitbackend/_async/requests.py @@ -37,7 +37,6 @@ AsyncClientCertificateProvider, ExpiringAuth, ) -from neo4j.warnings import PreviewWarning from .. import ( fromtestkit, @@ -219,12 +218,6 @@ async def new_driver(backend, data): kwargs["trusted_certificates"] = neo4j.TrustCustomCAs(*cert_paths) fromtestkit.set_notifications_config(kwargs, data) - expected_warnings.append( - ( - PreviewWarning, - r"notification warnings are a preview feature\.", - ) - ) with warnings_check(expected_warnings): driver = neo4j.AsyncGraphDatabase.driver( data["uri"], diff --git a/testkitbackend/_sync/requests.py b/testkitbackend/_sync/requests.py index bed78efe..e5e40a82 100644 --- a/testkitbackend/_sync/requests.py +++ b/testkitbackend/_sync/requests.py @@ -37,7 +37,6 @@ ClientCertificateProvider, ExpiringAuth, ) -from neo4j.warnings import PreviewWarning from .. import ( fromtestkit, @@ -219,12 +218,6 @@ def new_driver(backend, data): kwargs["trusted_certificates"] = neo4j.TrustCustomCAs(*cert_paths) fromtestkit.set_notifications_config(kwargs, data) - expected_warnings.append( - ( - PreviewWarning, - r"notification warnings are a preview feature\.", - ) - ) with warnings_check(expected_warnings): driver = neo4j.GraphDatabase.driver( data["uri"], diff --git a/tests/unit/async_/test_driver.py b/tests/unit/async_/test_driver.py index cd8faf9d..cce1aead 100644 --- a/tests/unit/async_/test_driver.py +++ b/tests/unit/async_/test_driver.py @@ -728,19 +728,15 @@ async def test_warn_notification_severity_driver_config( ) -> None: if inspect.isclass(expected) and issubclass(expected, Exception): assert min_sev is not ... # makes no sense to test - with ( - pytest.raises(expected), - pytest.warns(PreviewWarning, match="notification warnings"), - ): + with pytest.raises(expected): AsyncGraphDatabase.driver(uri, warn_notification_severity=min_sev) return if min_sev is ...: driver = AsyncGraphDatabase.driver(uri) else: - with pytest.warns(PreviewWarning, match="notification warnings"): - driver = AsyncGraphDatabase.driver( - uri, warn_notification_severity=min_sev - ) + driver = AsyncGraphDatabase.driver( + uri, warn_notification_severity=min_sev + ) async with driver: if min_sev_session is ...: session = driver.session() diff --git a/tests/unit/sync/test_driver.py b/tests/unit/sync/test_driver.py index c572c693..a6ce7920 100644 --- a/tests/unit/sync/test_driver.py +++ b/tests/unit/sync/test_driver.py @@ -727,19 +727,15 @@ def test_warn_notification_severity_driver_config( ) -> None: if inspect.isclass(expected) and issubclass(expected, Exception): assert min_sev is not ... # makes no sense to test - with ( - pytest.raises(expected), - pytest.warns(PreviewWarning, match="notification warnings"), - ): + with pytest.raises(expected): GraphDatabase.driver(uri, warn_notification_severity=min_sev) return if min_sev is ...: driver = GraphDatabase.driver(uri) else: - with pytest.warns(PreviewWarning, match="notification warnings"): - driver = GraphDatabase.driver( - uri, warn_notification_severity=min_sev - ) + driver = GraphDatabase.driver( + uri, warn_notification_severity=min_sev + ) with driver: if min_sev_session is ...: session = driver.session()