Skip to content

Commit aa774df

Browse files
committed
Add support for Python 3.12
1 parent fd7206a commit aa774df

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Neo4j versions supported:
1212

1313
Python versions supported:
1414

15+
* Python 3.12 (added in driver version 5.14.0)
1516
* Python 3.11 (added in driver version 5.3.0)
1617
* Python 3.10
1718
* Python 3.9

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ pandas = [
5050
"pandas >= 1.1.0, < 3.0.0",
5151
"numpy >= 1.7.0, < 2.0.0",
5252
]
53+
pyarrow = ["pyarrow >= 1.0.0"]
5354

5455
[build-system]
5556
requires = [
56-
"setuptools~=65.6",
57+
"setuptools>=66.1.0",
5758
"tomlkit~=0.11.6",
5859
]
5960
build-backend = "setuptools.build_meta"

requirements-dev.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# the driver itself
2-
-e .[pandas,numpy]
2+
-e .[pandas,numpy,pyarrow]
33

44
# auto-generate sync driver from async code
55
unasync>=0.5.0
@@ -10,16 +10,10 @@ mypy>=0.971
1010
typing-extensions>=4.3.0
1111
types-pytz>=2022.1.2
1212

13-
# for packaging
14-
setuptools~=65.6
15-
# TODO: 6.0 - can be removed once `setup.py` is simplified
16-
tomlkit~=0.11.6
17-
1813
# needed for running tests
1914
coverage[toml]>=5.5
2015
freezegun >= 1.2.2
2116
mock>=4.0.3
22-
pyarrow>=1.0.0
2317
pytest>=6.2.5
2418
pytest-asyncio>=0.16.0
2519
pytest-benchmark>=3.4.1

testkit/Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,29 @@ ENV PYENV_ROOT /.pyenv
4242
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
4343

4444
# Setup python version
45-
ENV PYTHON_VERSIONS 3.7 3.8 3.9 3.10 3.11
45+
ENV PYTHON_VERSIONS 3.7 3.8 3.9 3.10 3.11 3.12
4646

4747
RUN for version in $PYTHON_VERSIONS; do \
4848
pyenv install $version; \
4949
done
5050
RUN pyenv rehash
51-
RUN pyenv global $(pyenv versions --bare --skip-aliases)
51+
RUN pyenv global $(pyenv versions --bare --skip-aliases | sort --version-sort --reverse)
5252

5353
# Install Latest pip and setuptools for each environment
5454
# + tox and tools for starting the tests
5555
# https://pip.pypa.io/en/stable/news/
5656
RUN for version in $PYTHON_VERSIONS; do \
5757
python$version -m pip install -U pip && \
58-
python$version -m pip install -U setuptools && \
5958
python$version -m pip install -U coverage tox; \
6059
done
60+
61+
# Installing pyarrow lib until pre-built wheel for Python 3.12 exists
62+
# https://github.com/apache/arrow/issues/37880
63+
RUN apt update && \
64+
apt install -y -V lsb-release cmake gcc && \
65+
distro_name=$(lsb_release --id --short | tr 'A-Z' 'a-z') && \
66+
code_name=$(lsb_release --codename --short) && \
67+
wget https://apache.jfrog.io/artifactory/arrow/${distro_name}/apache-arrow-apt-source-latest-${code_name}.deb && \
68+
apt install -y -V ./apache-arrow-apt-source-latest-${code_name}.deb && \
69+
apt update && \
70+
apt install -y -V libarrow-dev # For C++ \

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{37,38,39,310,311}-{unit,integration,performance}
2+
envlist = py{37,38,39,310,311,312}-{unit,integration,performance}
33

44
[testenv]
55
passenv = TEST_NEO4J_*

0 commit comments

Comments
 (0)