Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: try to reintroduce Python 3.12, now that NumPy has released a beta. #2644

Merged
merged 18 commits into from
Sep 12, 2023
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/deploy-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
arch: [auto64]
build: ["cp{38,39,310,311}-*", "pp*"]
build: ["cp*", "pp*"]

include:
- os: macos-latest
type: "Universal"
arch: universal2
build: "cp{38,39,310,311}-*"
build: "cp*"

- os: windows-latest
arch: auto64
build: "cp{38,39,310,311}-*"
build: "cp*"

- os: windows-latest
arch: auto32
Expand All @@ -83,10 +83,10 @@ jobs:
with:
submodules: true

- name: Python 3.10
- name: Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'

- name: Prepare build files
run: pipx run nox -s prepare
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
SOURCE_DATE_EPOCH: ${{ needs.determine-source-date-epoch.outputs.source-date-epoch }}
strategy:
matrix:
python: [38, 39, 310, 311]
python: [38, 39, 310, 311, 312]
arch: [aarch64]
steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packaging-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: pypa/[email protected]
if: matrix.os == 'ubuntu-latest'
env:
CIBW_BUILD: cp311-manylinux_x86_64
CIBW_BUILD: cp312-manylinux_x86_64
with:
config-file: cibuildwheel.toml
package-dir: awkward-cpp
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
strategy:
matrix:
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
Expand All @@ -48,7 +49,8 @@ jobs:
runs-on: windows-2019

env:
PIP_ONLY_BINARY: cmake
PIP_ONLY_BINARY: cmake,numpy,pandas
PIP_PRE: "1"

steps:
- uses: actions/checkout@v4
Expand All @@ -60,6 +62,7 @@ jobs:
with:
python-version: '${{ matrix.python-version }}'
architecture: '${{ matrix.python-architecture }}'
allow-prereleases: true

- name: Generate build files
run: pipx run nox -s prepare -- --headers --signatures --tests
Expand Down Expand Up @@ -111,6 +114,7 @@ jobs:
strategy:
matrix:
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
Expand All @@ -119,7 +123,8 @@ jobs:
runs-on: macOS-11

env:
PIP_ONLY_BINARY: cmake
PIP_ONLY_BINARY: cmake,numpy
PIP_PRE: "1"

steps:
- uses: actions/checkout@v4
Expand All @@ -130,6 +135,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '${{ matrix.python-version }}'
allow-prereleases: true

- name: Debug wheel tags
run: python -m pip debug --verbose

- name: Generate build files
run: pipx run nox -s prepare -- --headers --signatures --tests
Expand Down Expand Up @@ -196,8 +205,11 @@ jobs:
- python-version: '3.8'
numpy-package: "numpy"
pyarrow-package: "pyarrow==7.0.0"
- python-version: '3.12'
numpy-package: "numpy>=1.26.0b1"
pyarrow-package: "pyarrow;python_version<'3.12'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable pyarrow for 3.12 without breaking shell


runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
PIP_ONLY_BINARY: cmake
Expand All @@ -211,6 +223,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '${{ matrix.python-version }}'
allow-prereleases: true

- name: Oldest supported CMake
uses: jwlawson/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![PyPI version](https://badge.fury.io/py/awkward.svg)](https://pypi.org/project/awkward)
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/awkward)](https://github.com/conda-forge/awkward-feedstock)
[![Python 3.7‒3.11](https://img.shields.io/badge/python-3.7%E2%80%923.11-blue)](https://www.python.org)
[![Python 3.8‒3.12](https://img.shields.io/badge/python-3.8%E2%80%923.12-blue)](https://www.python.org)
[![BSD-3 Clause License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![Build Test](https://github.com/scikit-hep/awkward/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/scikit-hep/awkward/actions/workflows/test.yml)

Expand Down
8 changes: 4 additions & 4 deletions cibuildwheel.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ test-skip = [
"pp*",
"*musllinux*",
]
manylinux-x86_64-image = "manylinux2014"
build-verbosity = 1
overrides = [
{ select = "cp3?-*", manylinux-x86_64-image = "manylinux2014" },
]

[tool.cibuildwheel.environment]
PIP_ONLY_BINARY = "cmake,numpy"

[[tool.cibuildwheel.overrides]]
select = "cp312-*"
environment.PIP_PRE = "1"
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
Expand Down
10 changes: 5 additions & 5 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
fsspec;sys_platform != "win32"
jax[cpu]>=0.2.15;sys_platform != "win32"
numba>=0.50.0;python_version <= "3.11"
numexpr
pandas>=0.24.0;sys_platform != "win32"
pyarrow>=7.0.0;sys_platform != "win32" and python_version <= "3.11"
jax[cpu]>=0.2.15;sys_platform != "win32" and python_version < "3.12"
numba>=0.50.0,!=0.58.0rc1;python_version < "3.12"
numexpr; python_version < "3.12"
pandas>=0.24.0;sys_platform != "win32" and python_version < "3.12"
pyarrow>=7.0.0;sys_platform != "win32" and python_version < "3.12"
pytest>=6
pytest-cov
pytest-xdist
Expand Down
5 changes: 2 additions & 3 deletions tests/test_0080_flatpandas_multiindex_rows_and_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
import json

import numpy as np # noqa: F401
import packaging.version
import pytest
import setuptools

import awkward as ak

pandas = pytest.importorskip("pandas")


@pytest.mark.skipif(
setuptools.extern.packaging.version.parse(pandas.__version__)
< setuptools.extern.packaging.version.parse("1.0"),
packaging.version.Version(pandas.__version__) < packaging.version.Version("1.0"),
reason="Test Pandas in 1.0+ because they had to fix their JSON format.",
)
def test():
Expand Down
8 changes: 3 additions & 5 deletions tests/test_2306_cppyy_jit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE


import packaging.version
import pytest
import setuptools

import awkward as ak
import awkward._connect.cling
Expand Down Expand Up @@ -46,8 +46,7 @@ def test_array_as_generated_dataset():


@pytest.mark.skipif(
setuptools.extern.packaging.version.parse(cppyy.__version__)
< setuptools.extern.packaging.version.parse("3.0.1"),
packaging.version.Version(cppyy.__version__) < packaging.version.Version("3.0.1"),
reason="Awkward Array can only work with cppyy 3.0.1 or later.",
)
def test_array_as_type():
Expand Down Expand Up @@ -82,8 +81,7 @@ def test_array_as_type():


@pytest.mark.skipif(
setuptools.extern.packaging.version.parse(cppyy.__version__)
< setuptools.extern.packaging.version.parse("3.0.1"),
packaging.version.Version(cppyy.__version__) < packaging.version.Version("3.0.1"),
reason="Awkward Array can only work with cppyy 3.0.1 or later.",
)
def test_array_as_templated_type():
Expand Down