Skip to content

Commit

Permalink
Merge pull request #430 from blue-yonder/pyarrow-17
Browse files Browse the repository at this point in the history
Support pyarrow 17
  • Loading branch information
xhochy authored Aug 9, 2024
2 parents 4feba17 + 4c5fd38 commit 6c0f054
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 32 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- +test-python3.11-arrow14.x.x
- +test-python3.11-arrow15.x.x
- +test-python3.11-arrow16.x.x
- +test-python3.11-arrow17.x.x
experimental: [ false ]
upload: [false]
include:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
PYARROW_VERSION: "15.0.0"
- PYTHON_VERSION: "3.11"
PYARROW_VERSION: "16.0.0"
- PYTHON_VERSION: "3.11"
PYARROW_VERSION: "17.0.0"
steps:
- name: Checkout branch
uses: actions/checkout@v4
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
repos:
- repo: https://github.com/Quantco/pre-commit-mirrors-black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black-conda
- repo: https://github.com/Quantco/pre-commit-mirrors-flake8
rev: 6.0.0
rev: 7.1.0
hooks:
- id: flake8-conda
- repo: https://github.com/Quantco/pre-commit-mirrors-isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort-conda
additional_dependencies: [toml]
args: ["--profile", "black"]
- repo: https://github.com/Quantco/pre-commit-mirrors-mypy
rev: "1.2.0"
rev: "1.10.1"
hooks:
- id: mypy-conda
additional_dependencies: [-c, conda-forge, types-setuptools]
- repo: https://github.com/Quantco/pre-commit-mirrors-pyupgrade
rev: 3.4.0
rev: 3.15.2
hooks:
- id: pyupgrade-conda
args:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Version history / changelog

From version 2.0.0, turbodbc adapts semantic versioning.

Version 4.13.0
--------------

* Support ``pyarrow=17`
Version 4.12.1
--------------
Expand Down
71 changes: 50 additions & 21 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ test-python3.10-arrow7.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=7,<8" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -145,7 +145,7 @@ test-python3.10-arrow8.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=8,<9" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -154,7 +154,7 @@ test-python3.10-arrow9.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=9,<10" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -163,7 +163,7 @@ test-python3.10-arrow10.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=10,<11" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -172,7 +172,7 @@ test-python3.10-arrow11.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=11,<12" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -181,7 +181,7 @@ test-python3.10-arrow12.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=12,<13" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -190,7 +190,7 @@ test-python3.10-arrow13.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=13,<14" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -199,7 +199,7 @@ test-python3.10-arrow14.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=14,<15" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -208,15 +208,33 @@ test-python3.10-arrow15.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=15,<16" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result

test-python3.10-arrow16.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=16,<17" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result

test-python3.10-arrow17.x.x:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=17,<18" \
--build-arg NUMPY_VERSION_RULE=">=1.21.2,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result

test-python3.10-arrow-nightly:
ARG PYTHON_VERSION="3.10.2"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg NUMPY_VERSION_RULE=">=1.21.4" \
--build-arg NUMPY_VERSION_RULE=">=1.21.4,<2" \
--build-arg CONDA_EXTRA="-c arrow-nightlies" \
+test/result /result

Expand All @@ -226,7 +244,7 @@ test-python3.11-arrow7.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=7,<8" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -235,7 +253,7 @@ test-python3.11-arrow8.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=8,<9" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -244,7 +262,7 @@ test-python3.11-arrow9.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=9,<10" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -253,7 +271,7 @@ test-python3.11-arrow10.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=10,<11" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -262,7 +280,7 @@ test-python3.11-arrow11.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=11,<12" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -271,7 +289,7 @@ test-python3.11-arrow12.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=12,<13" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -280,7 +298,7 @@ test-python3.11-arrow13.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=13,<14" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -289,7 +307,7 @@ test-python3.11-arrow14.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=14,<15" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -298,7 +316,7 @@ test-python3.11-arrow15.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=15,<16" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result
Expand All @@ -307,15 +325,24 @@ test-python3.11-arrow16.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=16,<17" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result

test-python3.11-arrow17.x.x:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg ARROW_VERSION_RULE=">=17,<18" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
+test/result /result

SAVE ARTIFACT /result AS LOCAL result

test-python3.11-arrow-nightly:
ARG PYTHON_VERSION="3.11.3"
COPY --build-arg PYTHON_VERSION="$PYTHON_VERSION" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3" \
--build-arg NUMPY_VERSION_RULE=">=1.23.3,<2" \
--build-arg CONDA_EXTRA="-c arrow-nightlies" \
+test/result /result

Expand All @@ -331,6 +358,7 @@ test-python3.10-all:
BUILD test-python3.10-arrow14.x.x
BUILD test-python3.10-arrow15.x.x
BUILD test-python3.10-arrow16.x.x
BUILD test-python3.10-arrow17.x.x
BUILD test-python3.10-arrow-nightly

test-python3.11-all:
Expand All @@ -344,6 +372,7 @@ test-python3.11-all:
BUILD test-python3.11-arrow14.x.x
BUILD test-python3.11-arrow15.x.x
BUILD test-python3.11-arrow16.x.x
BUILD test-python3.11-arrow17.x.x
BUILD test-python3.11-arrow-nightly

test-all:
Expand Down
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- conda-forge
dependencies:
- python>=3.10
- pyarrow>=7.0,<17
- pyarrow>=7.0,<18
- sel(unix): unixodbc
- c-compiler
- cxx-compiler
Expand All @@ -14,6 +14,6 @@ dependencies:
- pkg-config
- ninja
- pytest
- numpy
- numpy<2
- pybind11
- simdutf
1 change: 1 addition & 0 deletions python/turbodbc/api_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Global constants as required by PEP-249:
https://www.python.org/dev/peps/pep-0249/#globals
"""

apilevel = "2.0"
threadsafety = 1
paramstyle = "qmark"
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def get_extension_modules():

setup(
name="turbodbc",
version="4.12.1",
version="4.13.0",
description="turbodbc is a Python DB API 2.0 compatible ODBC driver",
long_description=long_description,
long_description_content_type="text/markdown",
Expand All @@ -270,11 +270,11 @@ def get_extension_modules():
packages=["turbodbc"],
setup_requires=[
"pybind11>=2.10.4",
"pyarrow>=7,<17",
"numpy>=1.20",
"pyarrow>=7,<18",
"numpy>=1.20,<2",
],
install_requires=[],
extras_require={"arrow": ["pyarrow>=7.0,<17"], "numpy": "numpy>=1.20.0"},
extras_require={"arrow": ["pyarrow>=7.0,<18"], "numpy": "numpy>=1.20.0,<2"},
python_requires=">=3.10",
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit 6c0f054

Please sign in to comment.