From 6a1d5782ea66b33e708c1d8a40829111340acf71 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Mon, 24 Apr 2023 12:56:38 +0200 Subject: [PATCH] Editorial changes in warning message and docs. --- docs/source/api.rst | 2 +- src/neo4j/_async/driver.py | 4 ++-- src/neo4j/_sync/driver.py | 4 ++-- testkitbackend/_async/requests.py | 2 +- testkitbackend/_sync/requests.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/api.rst b/docs/source/api.rst index 93a92c169..77ba106ba 100644 --- a/docs/source/api.rst +++ b/docs/source/api.rst @@ -1046,7 +1046,7 @@ See also https://github.com/neo4j/neo4j-python-driver/wiki/preview-features :Type: :data:`None`, :class:`.Auth` or ``(user, password)``-tuple :Default: :data:`None` - use the authentication information provided during driver creation. -.. versionadded:: 5.x +.. versionadded:: 5.8 .. _session-notifications-min-severity-ref: diff --git a/src/neo4j/_async/driver.py b/src/neo4j/_async/driver.py index 9bc682930..9779e79a6 100644 --- a/src/neo4j/_async/driver.py +++ b/src/neo4j/_async/driver.py @@ -503,7 +503,7 @@ def encrypted(self) -> bool: def _prepare_session_config(self, **config): if "auth" in config: - preview_warn("User switching is a preview features.", + preview_warn("User switching is a preview feature.", stack_level=3) _normalize_notifications_config(config) return config @@ -1165,7 +1165,7 @@ async def supports_session_auth(self) -> bool: won't throw a :exc:`ConfigurationError` when trying to use this driver feature. - .. versionadded:: 5.x + .. versionadded:: 5.8 """ async with self.session() as session: await session._connect(READ_ACCESS) diff --git a/src/neo4j/_sync/driver.py b/src/neo4j/_sync/driver.py index 769c9dfe6..93eb5ab20 100644 --- a/src/neo4j/_sync/driver.py +++ b/src/neo4j/_sync/driver.py @@ -502,7 +502,7 @@ def encrypted(self) -> bool: def _prepare_session_config(self, **config): if "auth" in config: - preview_warn("User switching is a preview features.", + preview_warn("User switching is a preview feature.", stack_level=3) _normalize_notifications_config(config) return config @@ -1164,7 +1164,7 @@ def supports_session_auth(self) -> bool: won't throw a :exc:`ConfigurationError` when trying to use this driver feature. - .. versionadded:: 5.x + .. versionadded:: 5.8 """ with self.session() as session: session._connect(READ_ACCESS) diff --git a/testkitbackend/_async/requests.py b/testkitbackend/_async/requests.py index af2c4da17..6feffca6d 100644 --- a/testkitbackend/_async/requests.py +++ b/testkitbackend/_async/requests.py @@ -553,7 +553,7 @@ async def NewSession(backend, data): if data.get("authorizationToken"): config["auth"] = fromtestkit.to_auth_token(data, "authorizationToken") expected_warnings.append( - (neo4j.PreviewWarning, "User switching is a preview features.") + (neo4j.PreviewWarning, "User switching is a preview feature.") ) fromtestkit.set_notifications_config(config, data) if expected_warnings: diff --git a/testkitbackend/_sync/requests.py b/testkitbackend/_sync/requests.py index f1ad1859f..3a23e3285 100644 --- a/testkitbackend/_sync/requests.py +++ b/testkitbackend/_sync/requests.py @@ -553,7 +553,7 @@ def NewSession(backend, data): if data.get("authorizationToken"): config["auth"] = fromtestkit.to_auth_token(data, "authorizationToken") expected_warnings.append( - (neo4j.PreviewWarning, "User switching is a preview features.") + (neo4j.PreviewWarning, "User switching is a preview feature.") ) fromtestkit.set_notifications_config(config, data) if expected_warnings: