Skip to content

Commit 1bed3bd

Browse files
authored
Support python 3.13 (#2249)
The PR proposes to build and test with Python 3.13 in conda package workflow. Also default python version used by other GH actions is bumped up to 3.13 except: - building docs because there is no support of python 3.13 in CuPy - coverage because there is no support of python 3.13 in `coveralls` Note, `conda-build` does not support python 3.13, but it is still possible to install it into env with python 3.12 and to run conda build with `--python 3.13` option. Also it forces to pin `numpy >= 1.23` in `meta.yaml` otherwise it is impossible to use the latest numpy version, because it is pinned to 2.0 by `--numpy 2.0` option (while numpy 2.0 does not support python 3.13 yet, it has been added later).
1 parent 8d7ed21 commit 1bed3bd

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

.github/workflows/check-mkl-interfaces.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
strategy:
3434
matrix:
35-
python: ['3.12']
35+
python: ['3.13']
3636
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
3737

3838
permissions:
@@ -125,7 +125,7 @@ jobs:
125125

126126
strategy:
127127
matrix:
128-
python: ['3.12']
128+
python: ['3.13']
129129
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL
130130

131131
permissions:

.github/workflows/conda-package.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
# Follow oneAPI installation instruction for conda, since intel channel is not longer available
1414
# CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
1515
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
16+
CONDA_BUILD_INDEX_ENV_PY_VER: '3.12' # conda does not support python 3.13
1617
CONDA_BUILD_VERSION: '24.11.2'
1718
CONDA_INDEX_VERSION: '0.5.0'
1819
RERUN_TESTS_ON_FAILURE: 'true'
@@ -28,7 +29,7 @@ jobs:
2829

2930
strategy:
3031
matrix:
31-
python: ['3.9', '3.10', '3.11', '3.12']
32+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
3233
os: [ubuntu-22.04, windows-2019]
3334

3435
permissions:
@@ -61,7 +62,7 @@ jobs:
6162
use-mamba: 'true'
6263
channels: conda-forge
6364
conda-remove-defaults: 'true'
64-
python-version: ${{ matrix.python }}
65+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
6566
activate-environment: 'build'
6667

6768
# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
@@ -107,7 +108,7 @@ jobs:
107108

108109
strategy:
109110
matrix:
110-
python: ['3.9', '3.10', '3.11', '3.12']
111+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
111112

112113
continue-on-error: true
113114

@@ -136,7 +137,7 @@ jobs:
136137
use-mamba: 'true'
137138
channels: conda-forge
138139
conda-remove-defaults: 'true'
139-
python-version: ${{ matrix.python }}
140+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
140141
activate-environment: ${{ env.TEST_ENV_NAME }}
141142

142143
- name: Install conda-index
@@ -158,8 +159,13 @@ jobs:
158159
echo PACKAGE_VERSION=${PACKAGE_VERSION}
159160
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
160161
162+
# conda-index does not support python 3.13
163+
- name: Remove conda-index
164+
run: mamba remove conda-index
165+
161166
- name: Install dpnp
162-
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
167+
run: |
168+
mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
163169
env:
164170
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
165171
MAMBA_NO_LOW_SPEED_LIMIT: 1
@@ -205,7 +211,7 @@ jobs:
205211

206212
strategy:
207213
matrix:
208-
python: ['3.9', '3.10', '3.11', '3.12']
214+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
209215

210216
continue-on-error: true
211217

@@ -244,7 +250,7 @@ jobs:
244250
use-mamba: 'true'
245251
channels: conda-forge
246252
conda-remove-defaults: 'true'
247-
python-version: ${{ matrix.python }}
253+
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
248254
activate-environment: ${{ env.TEST_ENV_NAME }}
249255

250256
- name: Store conda paths as envs
@@ -279,6 +285,10 @@ jobs:
279285
echo PACKAGE_VERSION: %PACKAGE_VERSION%
280286
(echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
281287
288+
# conda-index does not support python 3.13
289+
- name: Remove conda-index
290+
run: mamba remove conda-index
291+
282292
- name: Install dpnp
283293
run: |
284294
@echo on
@@ -331,7 +341,7 @@ jobs:
331341

332342
strategy:
333343
matrix:
334-
python: ['3.9', '3.10', '3.11', '3.12']
344+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
335345
os: [ubuntu-22.04, windows-2019]
336346

337347
runs-on: ${{ matrix.os }}
@@ -406,7 +416,7 @@ jobs:
406416
channels: conda-forge
407417
conda-remove-defaults: 'true'
408418
run-post: 'false'
409-
python-version: '3.12'
419+
python-version: '3.13'
410420
activate-environment: 'cleanup'
411421

412422
- name: Install anaconda-client

.github/workflows/cron-run-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
strategy:
3636
matrix:
37-
python: ['3.9', '3.10', '3.11', '3.12']
37+
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
3838
runner: [ubuntu-22.04, ubuntu-24.04, windows-2019]
3939

4040
continue-on-error: false

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Set up python
3232
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3333
with:
34-
python-version: '3.12'
34+
python-version: '3.13'
3535

3636
- name: Run pre-commit checks
3737
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ requirements:
1212
host:
1313
- python
1414
- setuptools
15-
- numpy
15+
- numpy >=1.23
1616
- cython
1717
- cmake >=3.21
1818
- ninja

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def _get_cmdclass():
3838
Programming Language :: Python :: 3.10
3939
Programming Language :: Python :: 3.11
4040
Programming Language :: Python :: 3.12
41+
Programming Language :: Python :: 3.13
4142
Programming Language :: Python :: Implementation :: CPython
4243
Topic :: Software Development
4344
Topic :: Scientific/Engineering

0 commit comments

Comments
 (0)