Skip to content

Commit de3e50a

Browse files
committed
MAINT: Replace Python3.8 by Python3.9.
We will drop Python3.8 in NumPy 1.25. This PR updates the ci tests and wheel builds to use 3.9.
1 parent 68d7aad commit de3e50a

File tree

7 files changed

+66
-51
lines changed

7 files changed

+66
-51
lines changed

.circleci/config.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# therefore a new base image chose instead to guarantee to
1313
# have a newer version >= 1.8.10 to avoid warnings
1414
# that related to the default behaviors or non-exist config options
15-
- image: cimg/base:2021.05
15+
- image: cimg/python:3.9
1616

1717
working_directory: ~/repo
1818

@@ -47,9 +47,10 @@ jobs:
4747
name: create virtual environment, install dependencies
4848
command: |
4949
sudo apt-get update
50-
sudo apt-get install -y python3.8 python3.8-dev python3-venv graphviz texlive-fonts-recommended texlive-latex-recommended \
50+
#sudo apt-get install -y python3.9 python3.9-dev python3-venv graphviz texlive-fonts-recommended texlive-latex-recommended \
51+
sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended \
5152
texlive-latex-extra latexmk texlive-xetex doxygen
52-
python3.8 -m venv venv
53+
python3.9 -m venv venv
5354
. venv/bin/activate
5455
5556
- run:

.github/workflows/build_test.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ defaults:
1616

1717
env:
1818
DOWNLOAD_OPENBLAS: 1
19-
PYTHON_VERSION: 3.8
19+
PYTHON_VERSION: 3.9
2020

2121
concurrency:
2222
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -88,14 +88,14 @@ jobs:
8888
submodules: recursive
8989
fetch-depth: 0
9090
# comes with python3.6
91-
- name: Install Python3.8
91+
- name: Install Python3.9
9292
run: |
9393
sudo apt update
9494
# for add-apt-repository
9595
sudo apt install software-properties-common -y
9696
sudo add-apt-repository ppa:deadsnakes/ppa -y
97-
sudo apt install python3.8-dev -y
98-
sudo ln -s /usr/bin/python3.8 /usr/bin/pythonx
97+
sudo apt install python3.9-dev -y
98+
sudo ln -s /usr/bin/python3.9 /usr/bin/pythonx
9999
pythonx -m pip install --upgrade pip setuptools wheel
100100
pythonx -m pip install -r test_requirements.txt
101101
- name: Install Compilers

.github/workflows/cygwin.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
platform: x86_64
3535
install-dir: 'C:\tools\cygwin'
3636
packages: >-
37-
python38-devel python38-zipp python38-importlib-metadata
38-
python38-cython python38-pip python38-wheel python38-cffi
39-
python38-pytz python38-setuptools python38-pytest
40-
python38-hypothesis liblapack-devel
37+
python39-devel python39-zipp python39-importlib-metadata
38+
python39-cython python39-pip python39-wheel python39-cffi
39+
python39-pytz python39-setuptools python39-pytest
40+
python39-hypothesis liblapack-devel
4141
gcc-fortran gcc-g++ git dash
4242
- name: Set Windows PATH
4343
uses: egor-tensin/cleanup-path@v1
@@ -53,34 +53,34 @@ jobs:
5353
- name: Verify python version
5454
# Make sure it's the Cygwin one, not a Windows one
5555
run: |
56-
dash -c "which python3.8; /usr/bin/python3.8 --version -V"
56+
dash -c "which python3.9; /usr/bin/python3.9 --version -V"
5757
- name: Build NumPy wheel
5858
run: |
59-
dash -c "/usr/bin/python3.8 -m pip install 'setuptools<49.2.0' pytest pytz cffi pickle5 importlib_metadata typing_extensions"
60-
dash -c "/usr/bin/python3.8 -m pip install -r test_requirements.txt"
61-
dash -c "/usr/bin/python3.8 setup.py bdist_wheel"
59+
dash -c "/usr/bin/python3.9 -m pip install 'setuptools<49.2.0' pytest pytz cffi pickle5 importlib_metadata typing_extensions"
60+
dash -c "/usr/bin/python3.9 -m pip install -r test_requirements.txt"
61+
dash -c "/usr/bin/python3.9 setup.py bdist_wheel"
6262
- name: Install new NumPy
6363
run: |
64-
bash -c "/usr/bin/python3.8 -m pip install dist/numpy-*cp38*.whl"
64+
bash -c "/usr/bin/python3.9 -m pip install dist/numpy-*cp39*.whl"
6565
- name: Rebase NumPy compiled extensions
6666
run: |
67-
dash "tools/rebase_installed_dlls_cygwin.sh" 3.8
67+
dash "tools/rebase_installed_dlls_cygwin.sh" 3.9
6868
- name: Run NumPy test suite
6969
run: >-
70-
dash -c "/usr/bin/python3.8 runtests.py -n -vv"
70+
dash -c "/usr/bin/python3.9 runtests.py -n -vv"
7171
- name: Upload wheel if tests fail
7272
uses: actions/upload-artifact@v3
7373
if: failure()
7474
with:
7575
name: numpy-cygwin-wheel
76-
path: dist/numpy-*cp38*.whl
76+
path: dist/numpy-*cp39*.whl
7777
- name: Check the extension modules on failure
7878
if: failure()
7979
run: |
80-
dash -c "/usr/bin/python3.8 -m pip show numpy"
81-
dash -c "/usr/bin/python3.8 -m pip show -f numpy | grep .dll"
80+
dash -c "/usr/bin/python3.9 -m pip show numpy"
81+
dash -c "/usr/bin/python3.9 -m pip show -f numpy | grep .dll"
8282
dash -c "/bin/tr -d '\r' <tools/list_installed_dll_dependencies_cygwin.sh >list_dlls_unix.sh"
83-
dash "list_dlls_unix.sh" 3.8
83+
dash "list_dlls_unix.sh" 3.9
8484
- name: Print installed package versions on failure
8585
if: failure()
8686
run: |

.github/workflows/wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
# TODO: uncomment PyPy 3.9 builds once PyPy
8282
# re-releases a new minor version
8383
# NOTE: This needs a bump of cibuildwheel version, also, once that happens.
84-
python: ["cp38", "cp39", "cp310", "cp311", "pp38"] #, "pp39"]
84+
python: ["cp39", "cp310", "cp311", "pp38"] #, "pp39"]
8585
exclude:
8686
# Don't build PyPy 32-bit windows
8787
- buildplat: [windows-2019, win32]
@@ -171,7 +171,7 @@ jobs:
171171
- uses: actions/setup-python@v4
172172
with:
173173
# Build sdist on lowest supported Python
174-
python-version: "3.8"
174+
python-version: "3.9"
175175
- name: Build sdist
176176
run: |
177177
python setup.py sdist

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cache:
2626

2727
jobs:
2828
include:
29-
- python: "3.8"
29+
- python: "3.9"
3030
os: linux
3131
arch: ppc64le
3232
env:
@@ -37,7 +37,7 @@ jobs:
3737
# VSX4 still not supported by ubuntu/gcc-11
3838
- EXPECT_CPU_FEATURES="VSX VSX2 VSX3"
3939

40-
- python: "3.8"
40+
- python: "3.9"
4141
os: linux
4242
arch: s390x
4343
# fixes VX assembler ambiguous errors

azure-pipelines.yml

+38-22
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ stages:
4949
if ! `gcc 2>/dev/null`; then
5050
sudo apt install gcc
5151
fi
52-
sudo apt install python3
53-
sudo apt install python3-dev
52+
sudo add-apt-repository ppa:deadsnakes/ppa -y
53+
sudo apt install python3.9
54+
sudo apt install python3.9-dev
55+
sudo apt install python3.9-distutils
5456
# python3 has no setuptools, so install one to get us going
55-
python3 -m pip install --user --upgrade pip 'setuptools<49.2.0'
56-
python3 -m pip install --user -r test_requirements.txt
57+
python3.9 -m pip install --user --upgrade pip 'setuptools<49.2.0'
58+
python3.9 -m pip install --user -r test_requirements.txt
5759
displayName: 'install python/requirements'
5860
- script: |
59-
python3 runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \
61+
python3.9 runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \
6062
--debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml
6163
displayName: 'Run native baseline Build / Tests'
6264
- task: PublishTestResults@2
@@ -78,7 +80,7 @@ stages:
7880
steps:
7981
- task: UsePythonVersion@0
8082
inputs:
81-
versionSpec: '3.8'
83+
versionSpec: '3.9'
8284
addToPath: true
8385
architecture: 'x64'
8486
- script: >-
@@ -91,7 +93,7 @@ stages:
9193
displayName: 'Run Lint Checks'
9294
failOnStderr: true
9395
94-
- job: Linux_Python_38_32bit_full_with_asserts
96+
- job: Linux_Python_39_32bit_full_with_asserts
9597
pool:
9698
vmImage: 'ubuntu-20.04'
9799
steps:
@@ -104,7 +106,7 @@ stages:
104106
/bin/bash -xc " \
105107
git config --global --add safe.directory /numpy && \
106108
cd /numpy && \
107-
/opt/python/cp38-cp38/bin/python -mvenv venv && \
109+
/opt/python/cp39-cp39/bin/python -mvenv venv && \
108110
source venv/bin/activate && \
109111
target=\$(python3 tools/openblas_support.py) && \
110112
cp -r \$target/lib/* /usr/lib && \
@@ -121,7 +123,7 @@ stages:
121123
inputs:
122124
testResultsFiles: '**/test-*.xml'
123125
failTaskOnFailedTests: true
124-
testRunTitle: 'Publish test results for Python 3.8-32 bit full Linux'
126+
testRunTitle: 'Publish test results for Python 3.9-32 bit full Linux'
125127

126128

127129
- job: macOS
@@ -130,11 +132,11 @@ stages:
130132
strategy:
131133
maxParallel: 3
132134
matrix:
133-
Python38:
134-
PYTHON_VERSION: '3.8'
135+
Python39:
136+
PYTHON_VERSION: '3.9'
135137
USE_OPENBLAS: '1'
136-
Python38-ILP64:
137-
PYTHON_VERSION: '3.8'
138+
Python39-ILP64:
139+
PYTHON_VERSION: '3.9'
138140
NPY_USE_BLAS_ILP64: '1'
139141
USE_OPENBLAS: '1'
140142
steps:
@@ -234,7 +236,7 @@ stages:
234236
inputs:
235237
testResultsFiles: '**/test-*.xml'
236238
failTaskOnFailedTests: true
237-
testRunTitle: 'Publish test results for Python 3.8 64-bit full Mac OS'
239+
testRunTitle: 'Publish test results for Python 3.9 64-bit full Mac OS'
238240

239241

240242
- job: Windows
@@ -243,27 +245,41 @@ stages:
243245
strategy:
244246
maxParallel: 6
245247
matrix:
246-
Python38-32bit-fast:
247-
PYTHON_VERSION: '3.8'
248+
Python39-32bit-fast:
249+
PYTHON_VERSION: '3.9'
248250
PYTHON_ARCH: 'x86'
249251
TEST_MODE: fast
250252
BITS: 32
251-
Python38-64bit-full:
252-
PYTHON_VERSION: '3.8'
253+
Python39-64bit-full:
254+
PYTHON_VERSION: '3.9'
253255
PYTHON_ARCH: 'x64'
254256
TEST_MODE: full
255257
BITS: 64
256-
Python39-32bit-fast:
257-
PYTHON_VERSION: '3.9'
258+
Python310-32bit-fast:
259+
PYTHON_VERSION: '3.10'
258260
PYTHON_ARCH: 'x86'
259261
TEST_MODE: fast
260262
BITS: 32
261-
Python39-64bit-full:
262-
PYTHON_VERSION: '3.9'
263+
Python310-64bit-full:
264+
PYTHON_VERSION: '3.10'
263265
PYTHON_ARCH: 'x64'
264266
TEST_MODE: full
265267
BITS: 64
266268
NPY_USE_BLAS_ILP64: '1'
269+
Python311-32bit-fast:
270+
PYTHON_VERSION: '3.11'
271+
PYTHON_ARCH: 'x86'
272+
TEST_MODE: fast
273+
BITS: 32
274+
Python311-64bit-full:
275+
PYTHON_VERSION: '3.11'
276+
PYTHON_ARCH: 'x64'
277+
TEST_MODE: full
278+
BITS: 64
279+
NPY_USE_BLAS_ILP64: '1'
280+
281+
# Not sure how the PyPy version is set here
282+
# It is set in azure-steps-windows.ym
267283
PyPy38-64bit-fast:
268284
PYTHON_VERSION: 'PyPy'
269285
PYTHON_ARCH: 'x64'

tools/ci/cirrus_general.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ linux_aarch64_task:
2323
# build in a matrix because building and testing all four wheels in a
2424
# single task takes longer than 60 mins (the default time limit for a
2525
# cirrus-ci task).
26-
- env:
27-
CIBW_BUILD: cp38-*
28-
EXPECT_CPU_FEATURES: NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
2926
- env:
3027
CIBW_BUILD: cp39-*
28+
EXPECT_CPU_FEATURES: NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
3129
- env:
3230
CIBW_BUILD: cp310-*
3331
- env:

0 commit comments

Comments
 (0)