Skip to content

MAINT: Drop Python 3.9 #26222

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

Merged
merged 1 commit into from
Apr 10, 2024
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
10 changes: 5 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'
- name: Install linter requirements
run:
python -m pip install -r requirements/linter_requirements.txt
Expand All @@ -60,7 +60,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'
- uses: ./.github/meson_actions

pypy:
Expand All @@ -74,7 +74,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: 'pypy3.9-v7.3.12'
python-version: 'pypy3.10-v7.3.15'
- name: Setup using scipy-openblas
run: |
python -m pip install -r requirements/ci_requirements.txt
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'
- name: Install build and test dependencies from PyPI
run: |
pip install -r requirements/build_requirements.txt
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'
- name: Install build and benchmarking dependencies
run: |
sudo apt-get update
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux_simd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'
- uses: ./.github/meson_actions
name: Build/Test

Expand All @@ -81,7 +81,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.9'
python-version: '3.10'

- name: Install GCC/8/9
run: |
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- [
"without optimizations",
"-Dallow-noblas=true -Ddisable-optimization=true",
"3.12-dev"
"3.12"
]
- [
"native",
Expand All @@ -132,7 +132,7 @@ jobs:
- [
"without avx512/avx2/fma3",
"-Dallow-noblas=true -Dcpu-dispatch=SSSE3,SSE41,POPCNT,SSE42,AVX,F16C",
"3.9"
"3.10"
]

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
os_python:
- [ubuntu-latest, '3.12']
- [windows-2019, '3.11']
- [macos-12, '3.9']
- [macos-12, '3.10']
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ jobs:
- [macos-14, macosx_arm64, accelerate] # always use accelerate
- [windows-2019, win_amd64, ""]
- [windows-2019, win32, ""]
python: ["cp39", "cp310", "cp311", "cp312", "pp39"]
python: ["cp310", "cp311", "cp312", "pp310"]
exclude:
# Don't build PyPy 32-bit windows
- buildplat: [windows-2019, win32, ""]
python: "pp39"
python: "pp310"
- buildplat: [ ubuntu-20.04, musllinux_x86_64, "" ]
python: "pp39"
python: "pp310"
- buildplat: [ macos-14, macosx_arm64, accelerate ]
python: "pp39"
python: "pp310"
env:
IS_32_BIT: ${{ matrix.buildplat[1] == 'win32' }}
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
# Build sdist on lowest supported Python
python-version: "3.9"
python-version: "3.10"
- name: Build sdist
run: |
python -m pip install -U pip build
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Prerequisites

Building NumPy requires the following installed software:

1) Python__ 3.9.x or newer.
1) Python__ 3.10.x or newer.

Please note that the Python development headers also need to be installed,
e.g., on Debian/Ubuntu one needs to install both `python3` and
`python3-dev`. On Windows and macOS this is normally not an issue.

2) Cython >= 3.0
2) Cython >= 3.0.6

3) pytest__ (optional)

Expand Down
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
addToPath: true
architecture: 'x64'
- script: >-
Expand All @@ -57,7 +57,7 @@ stages:
displayName: 'Run Lint Checks'
failOnStderr: true
- job: Linux_Python_39_32bit_full_with_asserts
- job: Linux_Python_310_32bit_full_with_asserts
pool:
vmImage: 'ubuntu-20.04'
steps:
Expand Down Expand Up @@ -89,8 +89,8 @@ stages:
TEST_MODE: full
BITS: 64
_USE_BLAS_ILP64: '1'
PyPy39-64bit-fast:
PYTHON_VERSION: 'pypy3.9'
PyPy310-64bit-fast:
PYTHON_VERSION: 'pypy3.10'
PYTHON_ARCH: 'x64'
TEST_MODE: fast
BITS: 64
Expand Down
5 changes: 2 additions & 3 deletions building_with_meson.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Building with Meson

_Note: this is for early adopters. It has been tested on Linux and macOS, and
with Python 3.9-3.12. Windows will be tested soon. There is one CI job to keep
the build stable. This may have rough edges, please open an issue if you run
into a problem._
with Python 3.10-3.12. There is one CI job to keep the build stable. This may
have rough edges, please open an issue if you run into a problem._

### Developer build

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ authors = [{name = "Travis E. Oliphant et al."}]
maintainers = [
{name = "NumPy Developers", email="numpy-discussion@python.org"},
]
requires-python = ">=3.9"
requires-python = ">=3.10"
readme = "README.md"
classifiers = [
'Development Status :: 5 - Production/Stable',
Expand All @@ -26,7 +26,6 @@ classifiers = [
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
Expand Down
11 changes: 6 additions & 5 deletions tools/ci/cirrus_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ freebsd_test_task:

install_devtools_script: |
pkg install -y git bash ninja ccache blas cblas lapack pkgconf
pkg install -y python311

<<: *MODIFIED_CLONE

Expand All @@ -86,22 +87,22 @@ freebsd_test_task:
prepare_env_script: |
# Create a venv (the `source` command needs bash, not the default sh shell)
chsh -s /usr/local/bin/bash
python -m venv .venv
python3.11 -m venv .venv
source .venv/bin/activate
# Minimal build and test requirements
python -m pip install -U pip
python -m pip install meson-python Cython pytest hypothesis
python3.11 -m pip install -U pip
python3.11 -m pip install meson-python Cython pytest hypothesis

build_script: |
chsh -s /usr/local/bin/bash
source .venv/bin/activate
python -m pip install . --no-build-isolation -v -Csetup-args="-Dallow-noblas=false"
python3.11 -m pip install . --no-build-isolation -v -Csetup-args="-Dallow-noblas=false"

test_script: |
chsh -s /usr/local/bin/bash
source .venv/bin/activate
cd tools
python -m pytest --pyargs numpy -m "not slow"
python3.11 -m pytest --pyargs numpy -m "not slow"
ccache -s

on_failure:
Expand Down
9 changes: 2 additions & 7 deletions tools/ci/cirrus_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ linux_aarch64_task:
# build in a matrix because building and testing all four wheels in a
# single task takes longer than 60 mins (the default time limit for a
# cirrus-ci task).
- env:
CIRRUS_CLONE_SUBMODULES: true
CIBW_BUILD: cp39-*
EXPECT_CPU_FEATURES: NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
- env:
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we want to move the EXPECT_CPU_FEATURES line to the 3.10 test?

Copy link
Member

@andyfaff andyfaff Apr 7, 2024

Choose a reason for hiding this comment

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

It wasn't clear to me when I was modifying the ci where these are actually used. It was left over from Travis ci configs

CIRRUS_CLONE_SUBMODULES: true
CIBW_BUILD: cp310-*
Expand All @@ -35,7 +31,6 @@ linux_aarch64_task:
CIBW_BUILD: cp311-*
- env:
CIRRUS_CLONE_SUBMODULES: true
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: cp312-*

initial_setup_script: |
Expand Down Expand Up @@ -64,10 +59,10 @@ macosx_arm64_task:
matrix:
- env:
CIRRUS_CLONE_SUBMODULES: true
CIBW_BUILD: cp39-* cp310-*
CIBW_BUILD: cp310-* cp311
- env:
CIRRUS_CLONE_SUBMODULES: true
CIBW_BUILD: cp311-* cp312-*
CIBW_BUILD: cp312-*
env:
PATH: /usr/local/lib:/usr/local/include:$PATH
CIBW_ARCHS: arm64
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/run_32_bit_linux_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set -xe

git config --global --add safe.directory /numpy
cd /numpy
/opt/python/cp39-cp39/bin/python -mvenv venv
/opt/python/cp310-cp310/bin/python -mvenv venv
source venv/bin/activate
pip install -r requirements/ci32_requirements.txt
python3 -m pip install -r requirements/test_requirements.txt
Expand Down
Loading