Skip to content

Commit 0026876

Browse files
committed
Python 3.14
1 parent d10d2cd commit 0026876

File tree

11 files changed

+22
-14
lines changed

11 files changed

+22
-14
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ See https://neo4j.com/developer/kb/neo4j-supported-versions/ for a driver-server
1919

2020
Python versions supported:
2121

22+
* Python 3.14
2223
* Python 3.13
2324
* Python 3.12
2425
* Python 3.11

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ classifiers = [
3737
"Programming Language :: Python :: 3.11",
3838
"Programming Language :: Python :: 3.12",
3939
"Programming Language :: Python :: 3.13",
40+
"Programming Language :: Python :: 3.14",
4041
"Topic :: Database",
4142
"Topic :: Software Development",
4243
"Typing :: Typed",

src/neo4j/_async/io/_bolt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import abc
2020
import asyncio
21+
import inspect
2122
from collections import deque
2223
from logging import getLogger
2324
from time import monotonic
@@ -198,7 +199,7 @@ def __init__(
198199
)
199200

200201
def __del__(self):
201-
if not asyncio.iscoroutinefunction(self.close):
202+
if not inspect.iscoroutinefunction(self.close):
202203
self.close()
203204

204205
@abc.abstractmethod

src/neo4j/_async/io/_common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
import asyncio
18+
import inspect
1819
import logging
1920
from contextlib import suppress
2021
from struct import pack as struct_pack
@@ -191,7 +192,7 @@ def inner(*args, **kwargs):
191192
try:
192193
func(*args, **kwargs)
193194
except (Neo4jError, ServiceUnavailable, SessionExpired) as exc:
194-
assert not asyncio.iscoroutinefunction(self.__on_error)
195+
assert not inspect.iscoroutinefunction(self.__on_error)
195196
self.__on_error(exc)
196197
raise
197198

@@ -212,7 +213,7 @@ async def inner(*args, **kwargs):
212213

213214
return inner
214215

215-
if asyncio.iscoroutinefunction(connection_attr):
216+
if inspect.iscoroutinefunction(connection_attr):
216217
return outer_async(connection_attr)
217218
return outer(connection_attr)
218219

src/neo4j/_async_compat/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async def callback(cb, *args, **kwargs):
6767

6868
@staticmethod
6969
def shielded(coro_function):
70-
assert asyncio.iscoroutinefunction(coro_function)
70+
assert inspect.iscoroutinefunction(coro_function)
7171

7272
@wraps(coro_function)
7373
async def shielded_function(*args, **kwargs):

src/neo4j/_sync/io/_bolt.py

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/neo4j/_sync/io/_common.py

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/neo4j/_warnings.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616

1717
from __future__ import annotations
1818

19-
import asyncio
19+
import inspect
2020
from functools import wraps
21-
from inspect import isclass
2221
from warnings import warn
2322

2423
from . import _typing as t
@@ -98,7 +97,7 @@ def _make_warning_decorator(
9897
warning_func: _WarningFunc,
9998
) -> t.Callable[[_FuncT], _FuncT]:
10099
def decorator(f):
101-
if asyncio.iscoroutinefunction(f):
100+
if inspect.iscoroutinefunction(f):
102101

103102
@wraps(f)
104103
async def inner(*args, **kwargs):
@@ -107,7 +106,8 @@ async def inner(*args, **kwargs):
107106

108107
inner._without_warning = f
109108
return inner
110-
if isclass(f):
109+
110+
if inspect.isclass(f):
111111
if hasattr(f, "__init__"):
112112
original_init = f.__init__
113113

@@ -125,6 +125,7 @@ def _without_warning(cls, *args, **kwargs):
125125
f._without_warning = classmethod(_without_warning)
126126
return f
127127
raise TypeError("Cannot decorate class without __init__")
128+
128129
else:
129130

130131
@wraps(f)

testkit/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ENV PIP_NO_CACHE_DIR=1
5656

5757
FROM base AS base-py-arg
5858
# Install all supported Python versions
59-
ARG PYTHON_VERSIONS="3.13 3.12 3.11 3.10"
59+
ARG PYTHON_VERSIONS="3.14 3.13 3.12 3.11 3.10"
6060

6161

6262
FROM base AS base-py-arg-single-python

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from __future__ import annotations
1818

1919
import asyncio
20+
import inspect
2021
import sys
2122
from functools import wraps
2223

@@ -186,7 +187,7 @@ def neo4j_session(neo4j_driver):
186187
@pytest_asyncio.fixture
187188
def aio_benchmark(benchmark, event_loop):
188189
def _wrapper(func, *args, **kwargs):
189-
if asyncio.iscoroutinefunction(func):
190+
if inspect.iscoroutinefunction(func):
190191

191192
@benchmark
192193
def _():

0 commit comments

Comments
 (0)