Skip to content

Commit 273433c

Browse files
authored
INTPYTHON-805 & INTPYTHON-704 Add support for PyArrow 22 and Python 3.14 (#361)
1 parent 048e864 commit 273433c

File tree

7 files changed

+119
-348
lines changed

7 files changed

+119
-348
lines changed

.github/workflows/dist-python.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,10 @@ jobs:
3939
- [ubuntu-24.04, manylinux_aarch64]
4040
- [macos-14, macosx_*]
4141
- [windows-2022, win_amd64]
42-
python: ["cp39", "cp310", "cp311", "cp312", "cp313", "cp313t"]
42+
python: ["cp310", "cp311", "cp312", "cp313", "cp314", "cp314t"]
4343
exclude:
44-
- buildplat: [macos-14, macosx_*]
45-
python: "cp39"
4644
- buildplat: [windows-2022, win_amd64]
47-
python: "cp313t"
48-
include:
49-
- buildplat: [macos-latest, macosx_*]
50-
python: "cp39"
51-
52-
45+
python: "cp314t"
5346
steps:
5447
- name: Checkout pymongoarrow
5548
uses: actions/checkout@v6
@@ -87,22 +80,12 @@ jobs:
8780
pipx install "cmake>=3.15,<4"
8881
8982
- name: Install deps
90-
run: python -m pip install "cibuildwheel>=2.4,<3" uv rust-just
91-
92-
- name: Build MacOS Py39 Wheels
93-
if: ${{ matrix.python == 'cp39' && matrix.buildplat[0] == 'macos-11' }}
94-
env:
95-
MACOS_TEST_SKIP: "*arm64"
96-
CIBW_BUILD: cp39-macosx_*
97-
CIBW_ENABLE: cpython-freethreading
98-
MACOSX_DEPLOYMENT_TARGET: "10.14"
99-
run: python -m cibuildwheel --output-dir wheelhouse
83+
run: python -m pip install "cibuildwheel>=3.3,<4" uv rust-just
10084

10185
- name: Build wheels
10286
if: ${{ matrix.buildplat[0] != 'macos-11' }}
10387
env:
10488
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
105-
CIBW_ENABLE: cpython-freethreading
10689
MACOSX_DEPLOYMENT_TARGET: "12.0"
10790
run: python -m cibuildwheel --output-dir wheelhouse
10891

@@ -123,7 +106,7 @@ jobs:
123106
- uses: actions/setup-python@v6
124107
with:
125108
# Build sdist on lowest supported Python
126-
python-version: '3.9'
109+
python-version: '3.10'
127110

128111
- name: Install deps
129112
run: |

.github/workflows/test-python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
strategy:
3838
matrix:
3939
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
40-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"]
40+
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
4141
fail-fast: false
4242
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
4343
steps:
@@ -138,7 +138,7 @@ jobs:
138138
- name: Setup Python
139139
uses: actions/setup-python@v6
140140
with:
141-
python-version: 3.9
141+
python-version: "3.10"
142142
cache: 'pip'
143143
cache-dependency-path: '**/pyproject.toml'
144144
- name: Install Deps
@@ -159,7 +159,7 @@ jobs:
159159
- name: Setup Python
160160
uses: actions/setup-python@v6
161161
with:
162-
python-version: 3.9
162+
python-version: "3.10"
163163
cache: 'pip'
164164
cache-dependency-path: '**/pyproject.toml'
165165
- name: Install Deps

bindings/python/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33

44
---
55

6+
# Changes in Version 1.11.0 (2025/XX/YY)
7+
8+
- Add support for PyArrow 22.0.
9+
- Add support for Python 3.14 and 3.14 free-threaded on Linux and MacOS.
10+
- Drop support for Python 3.9 and Python 3.13 free-threaded.
11+
612
# Changes in Version 1.10.0 (2025/08/05)
713

814
- Add support for PyArrow 21.0.

bindings/python/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ be of interest or that has already been addressed.
1313

1414
## Supported Interpreters
1515

16-
PyMongoArrow supports CPython 3.9+ and PyPy3.9+. Language features not
16+
PyMongoArrow supports CPython 3.10+. Language features not
1717
supported by all interpreters can not be used.
1818

1919
## Style Guide

bindings/python/justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import-check:
1414
uv run python -c "from pymongoarrow.lib import libbson_version"
1515

1616
benchmark *args:
17-
uv sync --dev --extra test --extra test-polars --extra test-pandas
17+
uv sync --dev --group benchmark --extra test --extra test-polars --extra test-pandas
1818
uv run asv run -e --python=$(uv run python -c "import sys;print(sys.executable)") {{args}}
1919

2020
install:

bindings/python/pyproject.toml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ requires = [
66
# Needed for numpy headers.
77
"numpy>=2.0",
88
# Must be kept in sync with "project.dependencies" below.
9-
"pyarrow>=21.0,<21.1.0",
9+
"pyarrow>=22.0,<22.1.0",
1010
]
1111

1212
[project]
@@ -25,19 +25,19 @@ classifiers = [
2525
"Operating System :: POSIX",
2626
"Programming Language :: Python :: 3",
2727
"Programming Language :: Python :: 3 :: Only",
28-
"Programming Language :: Python :: 3.9",
2928
"Programming Language :: Python :: 3.10",
3029
"Programming Language :: Python :: 3.11",
3130
"Programming Language :: Python :: 3.12",
3231
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: 3.14",
3333
"Programming Language :: Python :: Implementation :: CPython",
3434
"Topic :: Database",
3535
]
3636
readme = "README.md"
37-
requires-python = ">=3.9"
37+
requires-python = ">=3.10"
3838
dependencies = [
3939
# Must be kept in sync with "build_sytem.requires" above.
40-
"pyarrow >=21.0,<21.1",
40+
"pyarrow >=22.0,<22.1",
4141
"pymongo >=4.4,<5",
4242
"numpy>=2.0.1",
4343
"packaging >=23.2",
@@ -107,6 +107,7 @@ filterwarnings = [
107107
"error",
108108
"module:The global interpreter lock:RuntimeWarning", # from pandas
109109
"module:matching against an empty string will:pytest.PytestWarning", # from pandas
110+
"module:.*behaviour will change in pandas 3.0:FutureWarning", # from pandas
110111
]
111112

112113
[tool.ruff]
@@ -149,17 +150,19 @@ exclude = [
149150
"setup.py" = ["PTH", "EM", "B", "S", "E501"]
150151
"docs/source/conf.py" = ["E501", "S", "PTH"]
151152
"benchmarks.py" = ["T201", "E501", "C4"]
152-
"test/*.py" = ["PT", "S", "ARG", "B", "C", "EM", "E501", "RUF005"]
153+
"test/*.py" = ["PT", "S", "ARG", "B", "C", "EM", "E501", "RUF005", "UP038"]
153154

154155
[dependency-groups]
155156
dev = [
156-
"asv>=0.6.4",
157157
"check-manifest>=0.50",
158158
"packaging>=25.0",
159159
"pre-commit>=4.2.0",
160160
"setuptools>=79.0.0",
161161
"sphinx-autobuild>=2024.10.3",
162162
]
163+
benchmark = [
164+
"asv>=0.6.4"
165+
]
163166
docs = [
164167
"sphinx>=5.3,<9",
165168
"sphinx_rtd_theme>=2,<4",

0 commit comments

Comments
 (0)