Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ See https://neo4j.com/developer/kb/neo4j-supported-versions/ for a driver-server

Python versions supported:

* Python 3.14
* Python 3.13
* Python 3.12
* Python 3.11
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Database",
"Topic :: Software Development",
"Typing :: Typed",
Expand All @@ -59,7 +60,7 @@ pandas = [
"pandas >= 1.1.0, < 3.0.0",
"numpy >= 1.21.2, < 3.0.0",
]
pyarrow = ["pyarrow >= 6.0.0, < 22.0.0"]
pyarrow = ["pyarrow >= 6.0.0, < 23.0.0"]


[build-system]
Expand Down Expand Up @@ -151,7 +152,7 @@ dep-project-dependencies = [
"pytz",
"numpy >= 1.7.0, < 3.0.0",
"pandas >= 1.1.0, < 3.0.0",
"pyarrow >= 6.0.0, < 22.0.0",
"pyarrow >= 6.0.0, < 23.0.0",
]

[tool.setuptools.dynamic]
Expand Down
3 changes: 2 additions & 1 deletion src/neo4j/_async/io/_bolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import abc
import asyncio
import inspect
from collections import deque
from logging import getLogger
from time import monotonic
Expand Down Expand Up @@ -198,7 +199,7 @@ def __init__(
)

def __del__(self):
if not asyncio.iscoroutinefunction(self.close):
if not inspect.iscoroutinefunction(self.close):
self.close()

@abc.abstractmethod
Expand Down
5 changes: 3 additions & 2 deletions src/neo4j/_async/io/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import asyncio
import inspect
import logging
from contextlib import suppress
from struct import pack as struct_pack
Expand Down Expand Up @@ -191,7 +192,7 @@ def inner(*args, **kwargs):
try:
func(*args, **kwargs)
except (Neo4jError, ServiceUnavailable, SessionExpired) as exc:
assert not asyncio.iscoroutinefunction(self.__on_error)
assert not inspect.iscoroutinefunction(self.__on_error)
self.__on_error(exc)
raise

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

return inner

if asyncio.iscoroutinefunction(connection_attr):
if inspect.iscoroutinefunction(connection_attr):
return outer_async(connection_attr)
return outer(connection_attr)

Expand Down
2 changes: 1 addition & 1 deletion src/neo4j/_async_compat/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def callback(cb, *args, **kwargs):

@staticmethod
def shielded(coro_function):
assert asyncio.iscoroutinefunction(coro_function)
assert inspect.iscoroutinefunction(coro_function)

@wraps(coro_function)
async def shielded_function(*args, **kwargs):
Expand Down
3 changes: 2 additions & 1 deletion src/neo4j/_sync/io/_bolt.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/neo4j/_sync/io/_common.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/neo4j/_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

from __future__ import annotations

import asyncio
import inspect
from functools import wraps
from inspect import isclass
from warnings import warn

from . import _typing as t
Expand Down Expand Up @@ -98,7 +97,7 @@ def _make_warning_decorator(
warning_func: _WarningFunc,
) -> t.Callable[[_FuncT], _FuncT]:
def decorator(f):
if asyncio.iscoroutinefunction(f):
if inspect.iscoroutinefunction(f):

@wraps(f)
async def inner(*args, **kwargs):
Expand All @@ -107,7 +106,8 @@ async def inner(*args, **kwargs):

inner._without_warning = f
return inner
if isclass(f):

if inspect.isclass(f):
if hasattr(f, "__init__"):
original_init = f.__init__

Expand All @@ -125,6 +125,7 @@ def _without_warning(cls, *args, **kwargs):
f._without_warning = classmethod(_without_warning)
return f
raise TypeError("Cannot decorate class without __init__")

else:

@wraps(f)
Expand Down
2 changes: 1 addition & 1 deletion testkit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ENV PIP_NO_CACHE_DIR=1

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


FROM base AS base-py-arg-single-python
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from __future__ import annotations

import asyncio
import inspect
import sys
from functools import wraps

Expand Down Expand Up @@ -186,7 +187,7 @@ def neo4j_session(neo4j_driver):
@pytest_asyncio.fixture
def aio_benchmark(benchmark, event_loop):
def _wrapper(func, *args, **kwargs):
if asyncio.iscoroutinefunction(func):
if inspect.iscoroutinefunction(func):

@benchmark
def _():
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{310,311,312,313}-{unit,integration,performance}
envlist = py{310,311,312,313,314}-{unit,integration,performance}

[testenv]
passenv = TEST_*
Expand Down