From cbc90bcf398d649765d4608192860e2bcf2a8263 Mon Sep 17 00:00:00 2001 From: Icxolu <10486322+Icxolu@users.noreply.github.com> Date: Sun, 23 Aug 2026 00:53:38 +0200 Subject: [PATCH] drop support for Python 3.8 --- .github/workflows/ci.yml | 11 +---------- CHANGELOG.md | 1 + README.md | 3 ++- src/npyffi/objects.rs | 4 ++-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5b52e459..f36491055 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,6 @@ jobs: matrix: python-version: [ - "3.8", "3.9", "3.10", "3.11", @@ -69,13 +68,9 @@ jobs: }, ] include: - - python-version: 3.8 - platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" } - python-version: 3.9 platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" } exclude: - - python-version: 3.8 - platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" } - python-version: 3.9 platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" } # no 32 bit windows PyPy @@ -126,7 +121,7 @@ jobs: strategy: fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }} matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] # last numpy 1 release for 3.12 + python-version: ["3.9", "3.10", "3.11", "3.12"] # last numpy 1 release for 3.12 platform: [ { @@ -151,13 +146,9 @@ jobs: }, ] include: - - python-version: 3.8 - platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" } - python-version: 3.9 platform: { os: "macos-15-intel", python-architecture: "x64", rust-target: "x86_64-apple-darwin" } exclude: - - python-version: 3.8 - platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" } - python-version: 3.9 platform: { os: "macOS-latest", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" } steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 46f5bb60f..920bd4882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - `PyReadonlyArray`/`PyReadwriteArray` extraction now returns a `PyErr` which reports the actual dtype/dimensionality mismatch instead of nonsensical `CastError` messages like “'ndarray' is not an instance of 'ndarray'” ([#562](https://github.com/PyO3/rust-numpy/pull/562)) - Add support for free-threaded stable abi (abi3t) from Python 3.15t+ ([#556](https://github.com/PyO3/rust-numpy/pull/556)) - fixed free-threaded builds for 32 bit platforms from Python 3.15+ ([#556](https://github.com/PyO3/rust-numpy/pull/556)) + - Drop support for Python 3.8 ([#567](https://github.com/PyO3/rust-numpy/pull/567)) - v0.29.0 - Fix PyArray_DTypeMeta definition when Py_LIMITED_API is disabled ([#532](https://github.com/PyO3/rust-numpy/pull/532)) diff --git a/README.md b/README.md index b8a3a55ae..552494fc9 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,9 @@ Rust bindings for the NumPy C-API. ## Requirements - Rust >= 1.83.0 - Basically, our MSRV follows the one of [PyO3](https://github.com/PyO3/pyo3) -- Python >= 3.8 +- Python >= 3.9 - Python 3.7 support was dropped from 0.29 + - Python 3.8 support was dropped from 0.30 - Some Rust libraries - [ndarray](https://github.com/rust-ndarray/ndarray) for Rust-side matrix library - [PyO3](https://github.com/PyO3/pyo3) for Python bindings diff --git a/src/npyffi/objects.rs b/src/npyffi/objects.rs index 15f8cc7a1..635740f9e 100644 --- a/src/npyffi/objects.rs +++ b/src/npyffi/objects.rs @@ -431,9 +431,9 @@ pub struct PyUFuncObject_fields { pub core_signature: *mut c_char, pub type_resolver: PyUFunc_TypeResolutionFunc, pub reserved2: *mut c_void, // Was the legacy loop resolver - #[cfg(all(Py_3_8, not(Py_LIMITED_API)))] + #[cfg(not(Py_LIMITED_API))] pub vectorcall: Option, - #[cfg(not(all(Py_3_8, not(Py_LIMITED_API))))] + #[cfg(Py_LIMITED_API)] pub vectorcall: *mut c_void, pub reserved3: *mut c_void, // Was previously the `PyUFunc_MaskedInnerLoopSelectionFunc` pub op_flags: *mut npy_uint32,