Skip to content

Commit

Permalink
MAINT: Replace Python3.8 by Python3.9.
Browse files Browse the repository at this point in the history
We will drop Python3.8 in NumPy 1.25. This PR  updates the ci tests and
wheel builds to use 3.9.
  • Loading branch information
charris committed Dec 29, 2022
1 parent 18185f1 commit 2dd0f52
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 42 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# therefore a new base image chose instead to guarantee to
# have a newer version >= 1.8.10 to avoid warnings
# that related to the default behaviors or non-exist config options
- image: cimg/base:2021.05
- image: cimg/python:3.9

working_directory: ~/repo

Expand Down Expand Up @@ -47,9 +47,10 @@ jobs:
name: create virtual environment, install dependencies
command: |
sudo apt-get update
sudo apt-get install -y python3.8 python3.8-dev python3-venv graphviz texlive-fonts-recommended texlive-latex-recommended \
#sudo apt-get install -y python3.9 python3.9-dev python3-venv graphviz texlive-fonts-recommended texlive-latex-recommended \
sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended \
texlive-latex-extra latexmk texlive-xetex doxygen
python3.8 -m venv venv
python3.9 -m venv venv
. venv/bin/activate
- run:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaults:

env:
DOWNLOAD_OPENBLAS: 1
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -88,14 +88,14 @@ jobs:
submodules: recursive
fetch-depth: 0
# comes with python3.6
- name: Install Python3.8
- name: Install Python3.9
run: |
sudo apt update
# for add-apt-repository
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.8-dev -y
sudo ln -s /usr/bin/python3.8 /usr/bin/pythonx
sudo apt install python3.9-dev -y
sudo ln -s /usr/bin/python3.9 /usr/bin/pythonx
pythonx -m pip install --upgrade pip setuptools wheel
pythonx -m pip install -r test_requirements.txt
- name: Install Compilers
Expand Down Expand Up @@ -309,7 +309,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- uses: ./.github/actions

pypy38:
pypy39:
needs: [smoke_test]
runs-on: ubuntu-latest
steps:
Expand All @@ -319,7 +319,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: pypy-3.8-v7.3.9
python-version: pypy-3.9-v7.3.9
- uses: ./.github/actions

sdist:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ jobs:
# TODO: uncomment PyPy 3.9 builds once PyPy
# re-releases a new minor version
# NOTE: This needs a bump of cibuildwheel version, also, once that happens.
python: ["cp38", "cp39", "cp310", "cp311", "pp38"] #, "pp39"]
python: ["cp39", "cp310", "cp311", "pp39"]
exclude:
# Don't build PyPy 32-bit windows
- buildplat: [windows-2019, win32]
python: "pp38"
- buildplat: [windows-2019, win32]
python: "pp39"
env:
Expand Down Expand Up @@ -117,7 +115,7 @@ jobs:
if: ${{ matrix.buildplat[1] == 'win32' }}

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.11.4
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}

Expand Down Expand Up @@ -171,7 +169,7 @@ jobs:
- uses: actions/setup-python@v4
with:
# Build sdist on lowest supported Python
python-version: "3.8"
python-version: "3.9"
- name: Build sdist
run: |
python setup.py sdist
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cache:

jobs:
include:
- python: "3.8"
- python: "3.9"
os: linux
arch: ppc64le
env:
Expand All @@ -37,7 +37,7 @@ jobs:
# VSX4 still not supported by ubuntu/gcc-11
- EXPECT_CPU_FEATURES="VSX VSX2 VSX3"

- python: "3.8"
- python: "3.9"
os: linux
arch: s390x
# fixes VX assembler ambiguous errors
Expand Down
61 changes: 38 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ stages:
if ! `gcc 2>/dev/null`; then
sudo apt install gcc
fi
sudo apt install python3
sudo apt install python3-dev
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.9
sudo apt install python3.9-dev
sudo apt install python3.9-distutils
# python3 has no setuptools, so install one to get us going
python3 -m pip install --user --upgrade pip 'setuptools<49.2.0'
python3 -m pip install --user -r test_requirements.txt
python3.9 -m pip install --user --upgrade pip 'setuptools<49.2.0'
python3.9 -m pip install --user -r test_requirements.txt
displayName: 'install python/requirements'
- script: |
python3 runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \
python3.9 runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \
--debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml
displayName: 'Run native baseline Build / Tests'
- task: PublishTestResults@2
Expand All @@ -78,7 +80,7 @@ stages:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
versionSpec: '3.9'
addToPath: true
architecture: 'x64'
- script: >-
Expand All @@ -91,7 +93,7 @@ stages:
displayName: 'Run Lint Checks'
failOnStderr: true
- job: Linux_Python_38_32bit_full_with_asserts
- job: Linux_Python_39_32bit_full_with_asserts
pool:
vmImage: 'ubuntu-20.04'
steps:
Expand All @@ -104,7 +106,7 @@ stages:
/bin/bash -xc " \
git config --global --add safe.directory /numpy && \
cd /numpy && \
/opt/python/cp38-cp38/bin/python -mvenv venv && \
/opt/python/cp39-cp39/bin/python -mvenv venv && \
source venv/bin/activate && \
target=\$(python3 tools/openblas_support.py) && \
cp -r \$target/lib/* /usr/lib && \
Expand All @@ -121,7 +123,7 @@ stages:
inputs:
testResultsFiles: '**/test-*.xml'
failTaskOnFailedTests: true
testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux'
testRunTitle: 'Publish test results for Python 3.9-32 bit full Linux'


- job: macOS
Expand All @@ -130,11 +132,11 @@ stages:
strategy:
maxParallel: 3
matrix:
Python38:
PYTHON_VERSION: '3.8'
Python39:
PYTHON_VERSION: '3.9'
USE_OPENBLAS: '1'
Python38-ILP64:
PYTHON_VERSION: '3.8'
Python39-ILP64:
PYTHON_VERSION: '3.9'
NPY_USE_BLAS_ILP64: '1'
USE_OPENBLAS: '1'
steps:
Expand Down Expand Up @@ -234,7 +236,7 @@ stages:
inputs:
testResultsFiles: '**/test-*.xml'
failTaskOnFailedTests: true
testRunTitle: 'Publish test results for Python 3.8 64-bit full Mac OS'
testRunTitle: 'Publish test results for Python 3.9 64-bit full Mac OS'


- job: Windows
Expand All @@ -243,28 +245,41 @@ stages:
strategy:
maxParallel: 6
matrix:
Python38-32bit-fast:
PYTHON_VERSION: '3.8'
Python39-32bit-fast:
PYTHON_VERSION: '3.9'
PYTHON_ARCH: 'x86'
TEST_MODE: fast
BITS: 32
Python38-64bit-full:
PYTHON_VERSION: '3.8'
Python39-64bit-full:
PYTHON_VERSION: '3.9'
PYTHON_ARCH: 'x64'
TEST_MODE: full
BITS: 64
Python39-32bit-fast:
PYTHON_VERSION: '3.9'
Python310-32bit-fast:
PYTHON_VERSION: '3.10'
PYTHON_ARCH: 'x86'
TEST_MODE: fast
BITS: 32
Python39-64bit-full:
PYTHON_VERSION: '3.9'
Python310-64bit-full:
PYTHON_VERSION: '3.10'
PYTHON_ARCH: 'x64'
TEST_MODE: full
BITS: 64
NPY_USE_BLAS_ILP64: '1'
PyPy38-64bit-fast:
Python311-32bit-fast:
PYTHON_VERSION: '3.11'
PYTHON_ARCH: 'x86'
TEST_MODE: fast
BITS: 32
Python311-64bit-full:
PYTHON_VERSION: '3.11'
PYTHON_ARCH: 'x64'
TEST_MODE: full
BITS: 64
NPY_USE_BLAS_ILP64: '1'

# Not sure how the PyPy version is set here
PyPy39-64bit-fast:
PYTHON_VERSION: 'PyPy'
PYTHON_ARCH: 'x64'
TEST_MODE: fast
Expand Down
4 changes: 1 addition & 3 deletions tools/ci/cirrus_general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ 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:
CIBW_BUILD: cp38-*
EXPECT_CPU_FEATURES: NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
- env:
CIBW_BUILD: cp39-*
EXPECT_CPU_FEATURES: NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
- env:
CIBW_BUILD: cp310-*
- env:
Expand Down

0 comments on commit 2dd0f52

Please sign in to comment.