Skip to content

Commit 1479916

Browse files
committed
Merge branch '6.x' into remove-deprecated-neo4j-exports
2 parents f896f59 + cb4cf6d commit 1479916

File tree

3 files changed

+11
-32
lines changed

3 files changed

+11
-32
lines changed

src/neo4j/_async/work/session.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,11 @@ async def _run_transaction(
543543
transaction_function: t.Callable[
544544
te.Concatenate[AsyncManagedTransaction, _P], t.Awaitable[_R]
545545
],
546-
args: _P.args,
547-
kwargs: _P.kwargs,
546+
# *args: _P.args, **kwargs: _P.kwargs
547+
# gives more type safety, but is less performant and makes for harder
548+
# to read call sites
549+
args: t.Any,
550+
kwargs: t.Any,
548551
) -> _R:
549552
self._check_state()
550553
if not callable(transaction_function):

src/neo4j/_sync/work/session.py

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/unit/common/test_import_neo4j.py

+1-28
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def test_import_neo4j():
4545
("BoltDriver", None),
4646
("Bookmark", None),
4747
("Bookmarks", None),
48-
("Config", DeprecationWarning),
4948
("custom_auth", None),
5049
("DEFAULT_DATABASE", None),
5150
("Driver", None),
@@ -57,7 +56,6 @@ def test_import_neo4j():
5756
("IPv4Address", None),
5857
("IPv6Address", None),
5958
("kerberos_auth", None),
60-
("log", DeprecationWarning),
6159
("ManagedTransaction", None),
6260
("Neo4jDriver", None),
6361
("NotificationCategory", None),
@@ -66,7 +64,6 @@ def test_import_neo4j():
6664
("NotificationDisabledClassification", PreviewWarning),
6765
("NotificationMinimumSeverity", None),
6866
("NotificationSeverity", None),
69-
("PoolConfig", DeprecationWarning),
7067
("PreviewWarning", None),
7168
("Query", None),
7269
("READ_ACCESS", None),
@@ -76,11 +73,9 @@ def test_import_neo4j():
7673
("RoutingControl", None),
7774
("ServerInfo", None),
7875
("Session", None),
79-
("SessionConfig", DeprecationWarning),
8076
("SummaryCounters", None),
8177
("SummaryInputPosition", None),
8278
("SummaryNotification", None),
83-
("SummaryNotificationPosition", DeprecationWarning),
8479
("SYSTEM_DATABASE", None),
8580
("Transaction", None),
8681
("TRUST_ALL_CERTIFICATES", None),
@@ -90,7 +85,6 @@ def test_import_neo4j():
9085
("TrustSystemCAs", None),
9186
("unit_of_work", None),
9287
("Version", None),
93-
("WorkspaceConfig", DeprecationWarning),
9488
("WRITE_ACCESS", None),
9589
)
9690

@@ -129,28 +123,7 @@ def test_dir():
129123
def test_import_star():
130124
with pytest.warns() as warnings:
131125
importlib.__import__("neo4j", fromlist=("*",))
132-
assert len(warnings) == 9
133-
assert all(
134-
issubclass(w.category, (DeprecationWarning, PreviewWarning))
135-
for w in warnings
136-
)
137-
138-
for name in (
139-
"log",
140-
"Config",
141-
"PoolConfig",
142-
"SessionConfig",
143-
"WorkspaceConfig",
144-
"SummaryNotificationPosition",
145-
):
146-
assert (
147-
sum(
148-
bool(re.match(rf".*\b{name}\b.*", str(w.message)))
149-
for w in warnings
150-
if issubclass(w.category, DeprecationWarning)
151-
)
152-
== 1
153-
)
126+
assert len(warnings) == 3
154127

155128
for name in (
156129
"NotificationClassification",

0 commit comments

Comments
 (0)