Skip to content

Commit 0b31f60

Browse files
added ExperimentalWarning to API and documentation (#455)
1 parent dfc0feb commit 0b31f60

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/source/api.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,30 @@ Please provide details about your running environment,
12371237
+ The error message:
12381238
12391239
1240+
********
1241+
Warnings
1242+
********
1243+
1244+
The Python Driver uses the built-in :class:`python:DeprecationWarning` class to warn about deprecations.
1245+
1246+
The Python Driver uses the :class:`neo4j.ExperimentalWarning` class to warn about experimental features.
1247+
1248+
.. autoclass:: neo4j.ExperimentalWarning
1249+
1250+
1251+
Filter Warnings
1252+
===============
1253+
1254+
This example shows how to suppress the :class:`neo4j.ExperimentalWarning` using the :func:`python:warnings.filterwarnings` function.
1255+
1256+
.. code-block:: python
1257+
1258+
import warnings
1259+
from neo4j import ExperimentalWarning
1260+
1261+
warnings.filterwarnings("ignore", category=ExperimentalWarning)
1262+
1263+
12401264
********
12411265
Bookmark
12421266
********

neo4j/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"Query",
5454
"Session",
5555
"unit_of_work",
56+
"ExperimentalWarning",
5657
]
5758

5859
from logging import getLogger
@@ -87,6 +88,7 @@
8788
)
8889
from neo4j.meta import (
8990
experimental,
91+
ExperimentalWarning,
9092
get_user_agent,
9193
version as __version__,
9294
)

0 commit comments

Comments
 (0)