Skip to content

Commit 9c244ae

Browse files
committed
Merge branch '6.x' into remove-deprecated-modules
2 parents ef21a5f + cb4cf6d commit 9c244ae

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
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

+9-18
Original file line numberDiff line numberDiff line change
@@ -168,24 +168,15 @@ def test_import_star():
168168

169169

170170
NEO4J_MODULES = (
171-
("addressing", None),
172-
("api", None),
173-
("auth_management", None),
174-
("conf", DeprecationWarning),
175-
("data", DeprecationWarning),
176-
("debug", None),
177-
("exceptions", None),
178-
("meta", DeprecationWarning),
179-
("packstream", DeprecationWarning),
180-
("routing", DeprecationWarning),
181-
("warnings", None),
171+
"addressing",
172+
"api",
173+
"auth_management",
174+
"debug",
175+
"exceptions",
176+
"warnings",
182177
)
183178

184179

185-
@pytest.mark.parametrize(("name", "warning"), NEO4J_MODULES)
186-
def test_module_import(name, warning):
187-
if warning:
188-
with pytest.warns(warning):
189-
importlib.__import__(f"neo4j.{name}")
190-
else:
191-
importlib.__import__(f"neo4j.{name}")
180+
@pytest.mark.parametrize("name", NEO4J_MODULES)
181+
def test_module_import(name):
182+
importlib.__import__(f"neo4j.{name}")

0 commit comments

Comments
 (0)