Skip to content

Commit 22c1826

Browse files
authored
ARROW-107 Test against Python 3.11 (#114)
* ARROW-107 Test against Python 3.11 * produce arm and x86 wheels on mac * fixup * fixup * address warnings in workflows * try again * try again
1 parent 87bed4a commit 22c1826

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v3
2525
- name: Setup Python
26-
uses: actions/setup-python@v3
26+
uses: actions/setup-python@v4
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
cache: 'pip'

.github/workflows/release-python.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
defaults:
1616
run:
1717
working-directory: ./bindings/python
18+
shell: bash -eux {0}
1819

1920
jobs:
2021
build_wheels:
@@ -30,15 +31,22 @@ jobs:
3031
- [ubuntu-20.04, manylinux_x86_64]
3132
- [macos-11, macosx_*]
3233
- [windows-2019, win_amd64]
33-
python: ["cp37", "cp38", "cp39", "cp310"]
34+
python: ["cp37", "cp38", "cp39", "cp310", "cp311"]
3435

3536
steps:
3637
- name: Checkout pymongoarrow
3738
uses: actions/checkout@v3
3839
with:
3940
fetch-depth: 0
4041

41-
- uses: actions/setup-python@v3
42+
- name: Set up python version
43+
run: |
44+
export PYTHON_VERSION=$(sed 's/^cp3/3./' <<< ${{ matrix.python }} )
45+
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
46+
47+
- uses: actions/setup-python@v4
48+
with:
49+
python-version: ${{env.PYTHON_VERSION}}
4250

4351
- name: Install cibuildwheel
4452
run: python -m pip install "cibuildwheel>=2.4,<3"
@@ -71,7 +79,7 @@ jobs:
7179
with:
7280
fetch-depth: 0
7381

74-
- uses: actions/setup-python@v3
82+
- uses: actions/setup-python@v4
7583
with:
7684
# Build sdist on lowest supported Python
7785
python-version: '3.7'

.github/workflows/test-python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- uses: actions/checkout@v3
25-
- uses: actions/setup-python@v3
25+
- uses: actions/setup-python@v4
2626
- uses: pre-commit/[email protected]
2727
with:
2828
extra_args: --all-files --hook-stage=manual
@@ -33,13 +33,13 @@ jobs:
3333
strategy:
3434
matrix:
3535
os: ["ubuntu-20.04", "macos-latest", "windows-latest"]
36-
python-version: [3.7, 3.8, 3.9, "3.10"]
36+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
3737
fail-fast: false
3838
name: CPython ${{ matrix.python-version }}-${{ matrix.os }}
3939
steps:
4040
- uses: actions/checkout@v3
4141
- name: Setup Python
42-
uses: actions/setup-python@v3
42+
uses: actions/setup-python@v4
4343
with:
4444
python-version: ${{ matrix.python-version }}
4545
cache: 'pip'

bindings/python/cibw_before_build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ set -o errexit
99

1010
if [[ "$CIBW_BUILD" == *"macosx_"* ]]
1111
then
12-
mac_version="${MACOSX_DEPLOYMENT_TARGET/\./_}"
1312
if [[ "$ARCHFLAGS" == *"arm64"* ]]
1413
then
15-
platform="macosx_${mac_version}_universal2"
16-
export CMAKE_OSX_ARCHITECTURES="arm64;x86_64"
14+
platform="macosx_11_0_arm64"
15+
export CMAKE_OSX_ARCHITECTURES="arm64"
1716
else
18-
platform="macosx_${mac_version}_x86_64"
17+
platform="macosx_10_14_x86_64"
1918
fi
2019

2120
# Install pyarrow with the appropriate platform.

bindings/python/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = [
44
"wheel>=0.37",
55
"cython>=0.29",
66
# Must be kept in sync with the `install_requires` in `setup.cfg`
7-
"pyarrow>=10.0.0,<10.1.0",
7+
"pyarrow>=10.0.1,<10.1.0",
88
]
99

1010
[tool.cibuildwheel]
@@ -26,5 +26,5 @@ repair-wheel-command = [
2626
]
2727

2828
[tool.cibuildwheel.macos]
29-
archs = "x86_64 universal2"
30-
test-skip = "*universal2:arm64"
29+
archs = "x86_64 arm64"
30+
test-skip = "*arm64"

bindings/python/setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers =
2424
Programming Language :: Python :: 3.8
2525
Programming Language :: Python :: 3.9
2626
Programming Language :: Python :: 3.10
27+
Programming Language :: Python :: 3.11
2728
Programming Language :: Python :: Implementation :: CPython
2829
Topic :: Database
2930

@@ -34,7 +35,7 @@ packages = find:
3435
python_requires = >=3.7
3536
install_requires =
3637
# keep versions in sync with pyproject.toml "requires"
37-
pyarrow >=10,<10.1
38+
pyarrow >=10.0.1,<10.1
3839
pymongo >=3.11,<5
3940

4041
[options.package_data]

0 commit comments

Comments
 (0)