Skip to content

Commit bca0b10

Browse files
authored
Merge pull request #2631 from enwask/drop-39
deps: Drop Python 3.9
2 parents 1d1ba95 + 4480351 commit bca0b10

File tree

7 files changed

+54
-31
lines changed

7 files changed

+54
-31
lines changed

.github/workflows/flake8.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121

2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Set up Python 3.9
24+
- name: Set up Python 3.10
2525
uses: actions/setup-python@v5
2626
with:
27-
python-version: 3.9
27+
python-version: "3.10"
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip

.github/workflows/pytest-core-mpi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-22.04
2121
strategy:
2222
matrix:
23-
python-version: ['3.9', '3.11']
23+
python-version: ['3.10', '3.11']
2424

2525
env:
2626
DEVITO_LANGUAGE: "openmp"

.github/workflows/pytest-core-nompi.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
name: [
3333
pytest-ubuntu-py311-gcc11-cxxnoomp,
3434
pytest-ubuntu-py312-gcc12-cxxomp,
35-
pytest-ubuntu-py39-gcc14-omp,
36-
pytest-ubuntu-py310-gcc10-noomp,
35+
pytest-ubuntu-py310-gcc14-omp,
36+
pytest-ubuntu-py311-gcc10-noomp,
3737
pytest-ubuntu-py312-gcc13-omp,
38-
pytest-ubuntu-py39-gcc9-omp,
38+
pytest-ubuntu-py310-gcc9-omp,
3939
pytest-osx-py312-clang-omp,
40-
pytest-docker-py39-gcc-omp,
41-
pytest-docker-py39-icx-omp
40+
pytest-docker-py310-gcc-omp,
41+
pytest-docker-py310-icx-omp
4242
]
4343
set: [base, adjoint]
4444
include:
@@ -56,15 +56,15 @@ jobs:
5656
language: "CXXopenmp"
5757
sympy: "1.13"
5858

59-
- name: pytest-ubuntu-py39-gcc14-omp
60-
python-version: '3.9'
59+
- name: pytest-ubuntu-py310-gcc14-omp
60+
python-version: '3.10'
6161
os: ubuntu-24.04
6262
arch: "gcc-14"
6363
language: "openmp"
6464
sympy: "1.12"
6565

66-
- name: pytest-ubuntu-py310-gcc10-noomp
67-
python-version: '3.10'
66+
- name: pytest-ubuntu-py311-gcc10-noomp
67+
python-version: '3.11'
6868
os: ubuntu-22.04
6969
arch: "gcc-10"
7070
language: "C"
@@ -77,8 +77,8 @@ jobs:
7777
language: "openmp"
7878
sympy: "1.13"
7979

80-
- name: pytest-ubuntu-py39-gcc9-omp
81-
python-version: '3.9'
80+
- name: pytest-ubuntu-py310-gcc9-omp
81+
python-version: '3.10'
8282
os: ubuntu-22.04
8383
arch: "custom"
8484
language: "openmp"
@@ -91,15 +91,15 @@ jobs:
9191
language: "openmp"
9292
sympy: "1.12"
9393

94-
- name: pytest-docker-py39-gcc-omp
95-
python-version: '3.9'
94+
- name: pytest-docker-py310-gcc-omp
95+
python-version: '3.10'
9696
os: ubuntu-latest
9797
arch: "gcc"
9898
language: "openmp"
9999
sympy: "1.13"
100100

101-
- name: pytest-docker-py39-icx-omp
102-
python-version: '3.9'
101+
- name: pytest-docker-py310-icx-omp
102+
python-version: '3.10'
103103
os: ubuntu-latest
104104
arch: "icx"
105105
language: "openmp"
@@ -166,6 +166,18 @@ jobs:
166166
python3 -m pip install ${{ env.PIPFLAGS }} -e .[tests,extras]
167167
python3 -m pip install ${{ env.PIPFLAGS }} sympy==${{matrix.sympy}}
168168
169+
- name: Check Docker image Python version
170+
if: "contains(matrix.name, 'docker')"
171+
run: |
172+
declared_pyver="${{ matrix.python-version }}"
173+
actual_pyver=$(${{ env.RUN_CMD }} python3 --version | grep "Python " | cut -d' ' -f2 | cut -d'.' -f1,2)
174+
echo "Declared Python version: $declared_pyver"
175+
echo "Actual Python version: $actual_pyver"
176+
if [ "$declared_pyver" != "$actual_pyver" ]; then
177+
echo "Python version mismatch: declared $declared_pyver, image has $actual_pyver"
178+
exit 1
179+
fi
180+
169181
- name: Check configuration
170182
run: |
171183
${{ env.RUN_CMD }} python3 -c "from devito import configuration; print(''.join(['%s: %s \n' % (k, v) for (k, v) in configuration.items()]))"

.github/workflows/tutorials.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,29 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
name: [
31-
tutos-ubuntu-gcc-py39,
31+
tutos-ubuntu-gcc-py310,
3232
tutos-osx-clang-py311,
33-
tutos-docker-gcc-py39
33+
tutos-docker-gcc-py310
3434
]
3535

3636
include:
37-
- name: tutos-ubuntu-gcc-py39
37+
- name: tutos-ubuntu-gcc-py310
3838
os: ubuntu-latest
3939
compiler: gcc
4040
language: "openmp"
41-
pyver: "3.9"
41+
pyver: "3.10"
4242

4343
- name: tutos-osx-clang-py311
4444
os: macos-latest
4545
compiler: clang
4646
language: "C"
4747
pyver: "3.11"
4848

49-
- name: tutos-docker-gcc-py39
49+
- name: tutos-docker-gcc-py310
5050
os: ubuntu-latest
5151
compiler: gcc
5252
language: "openmp"
53-
pyver: "3.9"
53+
pyver: "3.10"
5454

5555
steps:
5656
- name: Checkout devito
@@ -74,20 +74,32 @@ jobs:
7474
7575
- name: Set run prefix
7676
run: |
77-
if [ "${{ matrix.name }}" == 'tutos-docker-gcc-py39' ]; then
77+
if [ "${{ matrix.name }}" == 'tutos-docker-gcc-py310' ]; then
7878
echo "RUN_CMD=docker run --init -t --rm --name testrun devito_img" >> $GITHUB_ENV
7979
else
8080
echo "RUN_CMD=" >> $GITHUB_ENV
8181
fi
8282
id: set-run
8383

8484
- name: Install dependencies
85-
if: matrix.name != 'tutos-docker-gcc-py39'
85+
if: matrix.name != 'tutos-docker-gcc-py310'
8686
run: |
8787
python -m pip install --upgrade pip
8888
pip install -e .[tests,extras]
8989
pip install blosc
9090
91+
- name: Check Docker image Python version
92+
if: matrix.name == 'tutos-docker-gcc-py310'
93+
run: |
94+
declared_pyver="${{ matrix.pyver }}"
95+
actual_pyver=$(${{ env.RUN_CMD }} python3 --version | cut -d' ' -f2 | cut -d'.' -f1,2)
96+
echo "Declared Python version: $declared_pyver"
97+
echo "Actual Python version: $actual_pyver"
98+
if [ "$declared_pyver" != "$actual_pyver" ]; then
99+
echo "Python version mismatch: declared $declared_pyver, image has $actual_pyver"
100+
exit 1
101+
fi
102+
91103
- name: Seismic notebooks
92104
run: |
93105
${{ env.RUN_CMD }} py.test --nbval -k 'not dask' -k 'not synthetics' examples/seismic/tutorials/

benchmarks/user/advisor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ advixe-cl --snapshot --project-dir=<advisor-project-name> pack -- /<new-snapshot
5757
* Running the `tripcounts` analysis is time-consuming, despite starting in paused
5858
mode. This analysis, together with the `survey` analysis, is necessary to
5959
generate a roofline. Both are run by `run_advisor.py`.
60-
* Requires Python 3.9 or later, untested in conda environments
60+
* Requires Python 3.10 or later, untested in conda environments
6161
* Currently requires download of repository and running `pip install .`, the scripts
6262
are currently not included as a package with the user installation of Devito
6363

environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- defaults
44
- conda-forge
55
dependencies:
6-
- python>=3.9,<3.13
6+
- python>=3.10,<3.13
77
- pip>=21.1.2
88
- pip:
99
- -r requirements.txt

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description = "Finite Difference DSL for symbolic computation."
1212
license = { file = "LICENSE.md" }
1313
readme = "README.md"
1414
keywords = ["finite-difference", "DSL", "symbolic", "jit", "devito"]
15-
requires-python = ">=3.9"
15+
requires-python = ">=3.10,<3.13"
1616
authors = [
1717
{ name = "Imperial College London", email = "g.gorman@imperial.ac.uk" },
1818
{ name = "Fabio Luporini", email = "fabio@devitocodes.com" },
@@ -29,7 +29,6 @@ classifiers = [
2929
"Operating System :: Unix",
3030
"Programming Language :: Python",
3131
"Programming Language :: Python :: 3",
32-
"Programming Language :: Python :: 3.9",
3332
"Programming Language :: Python :: 3.10",
3433
"Programming Language :: Python :: 3.11",
3534
"Programming Language :: Python :: 3.12",
@@ -87,4 +86,4 @@ ignore = [
8786
"W503","F405","E722","E741",
8887
"W504","W605"
8988
]
90-
exclude = [ ".github" ]
89+
exclude = [ ".github" ]

0 commit comments

Comments
 (0)