47
47
from .._meta import (
48
48
deprecation_warn ,
49
49
experimental_warn ,
50
- preview ,
51
- preview_warn ,
52
50
unclosed_resource_warn ,
53
51
)
54
52
from .._work import EagerResult
@@ -193,10 +191,7 @@ def driver(
193
191
driver_type , security_type , parsed = parse_neo4j_uri (uri )
194
192
195
193
if not isinstance (auth , AsyncAuthManager ):
196
- auth = AsyncAuthManagers .static ._without_warning (auth )
197
- else :
198
- preview_warn ("Auth managers are a preview feature." ,
199
- stack_level = 2 )
194
+ auth = AsyncAuthManagers .static (auth )
200
195
config ["auth" ] = auth
201
196
202
197
# TODO: 6.0 - remove "trust" config option
@@ -357,7 +352,7 @@ def bookmark_manager(
357
352
* ``bookmarks_consumer`` no longer receives the database name as
358
353
an argument.
359
354
360
- .. versionchanged:: 5.8 stabilized from experimental
355
+ .. versionchanged:: 5.8 Stabilized from experimental.
361
356
"""
362
357
return AsyncNeo4jBookmarkManager (
363
358
initial_bookmarks = initial_bookmarks ,
@@ -551,17 +546,14 @@ def session(self, **config) -> AsyncSession:
551
546
def _session (self , session_config ) -> AsyncSession :
552
547
return AsyncSession (self ._pool , session_config )
553
548
554
- def _read_session_config (self , config_kwargs , preview_check = True ):
555
- config = self ._prepare_session_config (preview_check , config_kwargs )
549
+ def _read_session_config (self , config_kwargs ):
550
+ config = self ._prepare_session_config (config_kwargs )
556
551
session_config = SessionConfig (self ._default_workspace_config ,
557
552
config )
558
553
return session_config
559
554
560
555
@classmethod
561
- def _prepare_session_config (cls , preview_check , config_kwargs ):
562
- if preview_check and "auth" in config_kwargs :
563
- preview_warn ("User switching is a preview feature." ,
564
- stack_level = 5 )
556
+ def _prepare_session_config (cls , config_kwargs ):
565
557
_normalize_notifications_config (config_kwargs )
566
558
return config_kwargs
567
559
@@ -745,11 +737,6 @@ async def example(driver: neo4j.AsyncDriver) -> int:
745
737
746
738
By default, the driver configuration is used.
747
739
748
- **This is a preview** (see :ref:`filter-warnings-ref`).
749
- It might be changed without following the deprecation policy.
750
- See also
751
- https://github.com/neo4j/neo4j-python-driver/wiki/preview-features
752
-
753
740
See also the Session config :ref:`session-auth-ref`.
754
741
:type auth_: typing.Tuple[typing.Any, typing.Any] | Auth | None
755
742
:param result_transformer_:
@@ -839,8 +826,11 @@ async def example(driver: neo4j.AsyncDriver) -> neo4j.Record::
839
826
840
827
.. versionchanged:: 5.8
841
828
842
- * Added the ``auth_`` parameter.
829
+ * Added ``auth_`` parameter in preview .
843
830
* Stabilized from experimental.
831
+
832
+ .. versionchanged:: 5.14
833
+ Stabilized ``auth_`` parameter from preview.
844
834
"""
845
835
self ._check_state ()
846
836
invalid_kwargs = [k for k in kwargs if
@@ -865,8 +855,7 @@ async def example(driver: neo4j.AsyncDriver) -> neo4j.Record::
865
855
"impersonated_user" : impersonated_user_ ,
866
856
"bookmark_manager" : bookmark_manager_ ,
867
857
"auth" : auth_ ,
868
- },
869
- preview_check = False
858
+ }
870
859
)
871
860
session = self ._session (session_config )
872
861
async with session :
@@ -1072,7 +1061,7 @@ async def supports_multi_db(self) -> bool:
1072
1061
driver feature.
1073
1062
"""
1074
1063
self ._check_state ()
1075
- session_config = self ._read_session_config ({}, preview_check = False )
1064
+ session_config = self ._read_session_config ({})
1076
1065
async with self ._session (session_config ) as session :
1077
1066
await session ._connect (READ_ACCESS )
1078
1067
assert session ._connection
@@ -1106,7 +1095,6 @@ async def verify_authentication(
1106
1095
1107
1096
else :
1108
1097
1109
- @preview ("User switching is a preview feature." )
1110
1098
async def verify_authentication (
1111
1099
self ,
1112
1100
auth : t .Union [Auth , t .Tuple [t .Any , t .Any ], None ] = None ,
@@ -1140,12 +1128,9 @@ async def verify_authentication(
1140
1128
Use the exception to further understand the cause of the
1141
1129
connectivity problem.
1142
1130
1143
- **This is a preview** (see :ref:`filter-warnings-ref`).
1144
- It might be changed without following the deprecation policy.
1145
- See also
1146
- https://github.com/neo4j/neo4j-python-driver/wiki/preview-features
1147
-
1148
1131
.. versionadded:: 5.8
1132
+
1133
+ .. versionchanged:: 5.14 Stabilized from experimental.
1149
1134
"""
1150
1135
self ._check_state ()
1151
1136
if config :
@@ -1190,7 +1175,7 @@ async def supports_session_auth(self) -> bool:
1190
1175
.. versionadded:: 5.8
1191
1176
"""
1192
1177
self ._check_state ()
1193
- session_config = self ._read_session_config ({}, preview_check = False )
1178
+ session_config = self ._read_session_config ({})
1194
1179
async with self ._session (session_config ) as session :
1195
1180
await session ._connect (READ_ACCESS )
1196
1181
assert session ._connection
0 commit comments