From 2749145b373304fa23a2e52be1673b315950f8c8 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Thu, 7 Nov 2024 12:55:58 -0600 Subject: [PATCH 1/4] chore: remove Python 3.8, ensure Python 3.13 is included --- .github/workflows/test.yml | 7 +++---- README.md | 2 +- noxfile.py | 2 +- pyproject.toml | 5 ++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f896831328..417174d5f1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,6 @@ jobs: - '3.11' - '3.10' - '3.9' - - '3.8' python-architecture: - x64 dependencies-kind: @@ -58,7 +57,7 @@ jobs: python-architecture: x86 runs-on: windows-latest dependencies-kind: numpy1 - - python-version: '3.8' + - python-version: '3.9' python-architecture: x64 runs-on: ubuntu-latest dependencies-kind: minimal @@ -180,9 +179,9 @@ jobs: # Cache invalidates daily by default cache-environment: true environment-name: awkward - # Need Python 3.8 for the cached wheels + # Need Python 3.9 for the cached wheels create-args: >- - python=3.8 + python=3.9 numpy root diff --git a/README.md b/README.md index 7cc935cc3e..0abfb31e8e 100644 --- a/README.md +++ b/README.md @@ -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.8‒3.12](https://img.shields.io/badge/python-3.8%E2%80%923.12-blue)](https://www.python.org) +[![Python 3.9‒3.13](https://img.shields.io/badge/python-3.9%E2%80%923.13-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) diff --git a/noxfile.py b/noxfile.py index eafd77fe4a..b9c258c4a5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -9,7 +9,7 @@ import nox -ALL_PYTHONS = ["3.8", "3.9", "3.10", "3.11", "3.12"] +ALL_PYTHONS = ["3.9", "3.10", "3.11", "3.12", "3.13"] nox.needs_version = ">=2024.3.2" nox.options.default_venv_backend = "uv|virtualenv" diff --git a/pyproject.toml b/pyproject.toml index 9f476c8e62..0145884cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ name = "awkward" version = "2.6.10" description = "Manipulate JSON-like data with NumPy-like idioms." license = { text = "BSD-3-Clause" } -requires-python = ">=3.8" +requires-python = ">=3.9" authors = [ { name = "Jim Pivarski", email = "pivarski@princeton.edu" }, ] @@ -27,7 +27,6 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -138,7 +137,7 @@ filterwarnings = [ log_cli_level = "info" [tool.pylint] -py-version = "3.8" +py-version = "3.9" jobs = "0" ignore-paths = [ "src/awkward/_typeparser/generated_parser.py", From c02906ec78030bf1ac6283c2b01dc760a0140a24 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:57:09 +0000 Subject: [PATCH 2/4] style: pre-commit fixes --- dev/flake8_awkward.py | 3 ++- src/awkward/_nplikes/typetracer.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/flake8_awkward.py b/dev/flake8_awkward.py index bc5e5d9063..1ba5bd29d8 100644 --- a/dev/flake8_awkward.py +++ b/dev/flake8_awkward.py @@ -4,7 +4,8 @@ import ast import sys -from typing import Iterator, NamedTuple +from collections.abc import Iterator +from typing import NamedTuple class Flake8ASTErrorInfo(NamedTuple): diff --git a/src/awkward/_nplikes/typetracer.py b/src/awkward/_nplikes/typetracer.py index 548071c0ee..c4ad914c85 100644 --- a/src/awkward/_nplikes/typetracer.py +++ b/src/awkward/_nplikes/typetracer.py @@ -2,9 +2,9 @@ from __future__ import annotations -from collections.abc import Collection, Sequence, Set +from collections.abc import Collection, Iterator, Sequence, Set from numbers import Number -from typing import Callable, Iterator +from typing import Callable import numpy From 9c4543237cab27033430d5c9d722c2e9d97e954d Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Thu, 7 Nov 2024 15:12:20 -0600 Subject: [PATCH 3/4] maybe fix failing tests --- .github/workflows/packaging-test.yml | 2 +- awkward-cpp/src/awkward_cpp/cpu_kernels.py | 7 +------ awkward-cpp/src/awkward_cpp/libawkward.py | 7 +------ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/packaging-test.yml b/.github/workflows/packaging-test.yml index 5ecbc3e513..5821073157 100644 --- a/.github/workflows/packaging-test.yml +++ b/.github/workflows/packaging-test.yml @@ -71,7 +71,7 @@ jobs: - uses: pypa/cibuildwheel@v2.21 env: CIBW_ARCHS_MACOS: universal2 - CIBW_BUILD: cp39-win_amd64 cp310-manylinux_x86_64 cp38-macosx_universal2 + CIBW_BUILD: cp39-win_amd64 cp310-manylinux_x86_64 cp39-macosx_universal2 with: config-file: cibuildwheel.toml package-dir: awkward-cpp diff --git a/awkward-cpp/src/awkward_cpp/cpu_kernels.py b/awkward-cpp/src/awkward_cpp/cpu_kernels.py index 20e18fdd7a..e1bcd186be 100644 --- a/awkward-cpp/src/awkward_cpp/cpu_kernels.py +++ b/awkward-cpp/src/awkward_cpp/cpu_kernels.py @@ -3,13 +3,8 @@ from __future__ import annotations import ctypes +import importlib.resources as importlib_resources import platform -import sys - -if sys.version_info < (3, 9): - import importlib_resources -else: - import importlib.resources as importlib_resources import awkward_cpp._kernel_signatures diff --git a/awkward-cpp/src/awkward_cpp/libawkward.py b/awkward-cpp/src/awkward_cpp/libawkward.py index 2cf9f85e7a..c6bdb5f52c 100644 --- a/awkward-cpp/src/awkward_cpp/libawkward.py +++ b/awkward-cpp/src/awkward_cpp/libawkward.py @@ -3,13 +3,8 @@ from __future__ import annotations import ctypes +import importlib.resources as importlib_resources import platform -import sys - -if sys.version_info < (3, 9): - import importlib_resources -else: - import importlib.resources as importlib_resources if platform.system() == "Windows": name = "awkward.dll" From e5acc83ac9bb08bbaadf368950145d79496dab22 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Thu, 7 Nov 2024 15:29:24 -0600 Subject: [PATCH 4/4] minimum NumPy for Python 3.9 is 1.19.3 --- requirements-test-minimal.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test-minimal.txt b/requirements-test-minimal.txt index 4e0f842306..106bb58fe1 100644 --- a/requirements-test-minimal.txt +++ b/requirements-test-minimal.txt @@ -1,5 +1,5 @@ fsspec>=2022.11.0;sys_platform != "win32" -numpy==1.18.0 +numpy==1.19.3 pyarrow==7.0.0 pytest>=6 pytest-cov