diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 3f22d713da..61a320c25f 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -58,7 +58,7 @@ env: NETCDF_FORTRAN_VERSION: 4.6 NVFORTRAN_VERSION: 25.7 OPENMPI_VERSION: 5.0 - PYTHON_VERSION: 3.13 + PYTHON_VERSION: 3.14 NUM_PARALLEL: 16 jobs: diff --git a/.github/workflows/extraction_test.yml b/.github/workflows/extraction_test.yml index 8e56f7edf2..7f3d32f909 100644 --- a/.github/workflows/extraction_test.yml +++ b/.github/workflows/extraction_test.yml @@ -122,9 +122,8 @@ jobs: source /archive/psyclone-spack/psyclone-spack-Jun25/spack-repo/share/spack/setup-env.sh spack load lfric-build-environment%gcc@14 source .runner_venv/bin/activate - export LFRIC_DIR=/archive/psyclone-tests/latest-run/extraction/lfric_apps_${LFRIC_APPS_REV} - export PSYCLONE_CONFIG_FILE=${PSYCLONE_LFRIC_DIR}/KGOs/lfric_psyclone.cfg export PSYCLONE_LFRIC_DIR=${GITHUB_WORKSPACE}/examples/lfric/scripts + export PSYCLONE_CONFIG_FILE=${PSYCLONE_LFRIC_DIR}/KGOs/lfric_psyclone.cfg export COMPILER_PROFILE=fast-debug export NUM_PROCS=6 export MAX_PROC=$((NUM_PROCS-1)) diff --git a/.github/workflows/lfric_test.yml b/.github/workflows/lfric_test.yml index 3dab6b3200..1dbc5a6c83 100644 --- a/.github/workflows/lfric_test.yml +++ b/.github/workflows/lfric_test.yml @@ -44,7 +44,7 @@ on: env: LFRIC_APPS_REV: 10798 LFRIC_CORE_REV: 52772 - PYTHON_VERSION: 3.13 + PYTHON_VERSION: 3.14 GCC_VERSION: 14 NVHPC_VERSION: 25.1 NUM_PARALLEL: 16 diff --git a/.github/workflows/nemo_tests.yml b/.github/workflows/nemo_tests.yml index 2f899247bc..bf6594a71e 100644 --- a/.github/workflows/nemo_tests.yml +++ b/.github/workflows/nemo_tests.yml @@ -48,7 +48,7 @@ env: NVFORTRAN_VERSION: 25.7 ONEAPI_VERSION: 2025.0 PERL_VERSION: 5.42 - PYTHON_VERSION: 3.13 + PYTHON_VERSION: 3.14 NUM_PARALLEL: 16 PREFIX: /archive/psyclone-tests/latest-run/ diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5d8e1ebaa5..93e5123e6a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -63,7 +63,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.14' - run: sudo apt-get install -y graphviz doxygen - run: python -m pip install --upgrade pip - run: pip install .[doc] @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.13'] + python-version: ['3.9', '3.14'] steps: - uses: actions/checkout@v4 with: diff --git a/changelog b/changelog index 09b2133073..d8ec4c512a 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ + 8) PR #3190. Add python 3.14 in the CI and integration tests (except the + LFRic Extraction tests). + 7) PR #3181 for #3173. Adds protections for CodeBlocks in the DataSharingAttributeMixin. diff --git a/doc/developer_guide/working_practises.rst b/doc/developer_guide/working_practises.rst index 0e7b987eba..634f6b773f 100644 --- a/doc/developer_guide/working_practises.rst +++ b/doc/developer_guide/working_practises.rst @@ -493,13 +493,13 @@ computational cost (so that we 'fail fast'): 3. All links within the Sphinx documentation (rst files) are checked (see note below); - 4. All of the examples are tested (for Python versions 3.10 and 3.13) + 4. All of the examples are tested (for Python versions 3.9 and 3.14) using the ``Makefile`` in the ``examples`` directory. No compilation is performed; only the ``transform`` (performs the PSyclone transformations) and ``notebook`` (runs the various Jupyter notebooks) targets are used. The ``transform`` target is run 2-way parallel (``-j 2``). - 5. The full test suite is run for Python versions 3.10 and 3.13 but + 5. The full test suite is run for Python versions 3.9 and 3.14 but without the compilation checks. ``pytest`` is passed the ``-n auto`` flag so that it will run the tests in parallel on as many cores as are available (currently 2 on GHA instances). diff --git a/src/psyclone/tests/generator_test.py b/src/psyclone/tests/generator_test.py index acbbcae881..9aa1b3f447 100644 --- a/src/psyclone/tests/generator_test.py +++ b/src/psyclone/tests/generator_test.py @@ -1408,7 +1408,10 @@ def test_main_unexpected_fatal_error(capsys, monkeypatch): assert ("Error, unexpected exception, please report to the authors:" in output) assert "Traceback (most recent call last):" in output - assert "TypeError: argument of type 'int' is not iterable" in output + # Python >= 3.14 uses "is not a container or iterable", + # so we split the assertion for cross-version support + assert "TypeError: argument of type 'int' is not " in output + assert "iterable" in output def test_main_fort_line_length_off(capsys): diff --git a/src/psyclone/tests/utils_test.py b/src/psyclone/tests/utils_test.py index 15c684133f..d39152805c 100644 --- a/src/psyclone/tests/utils_test.py +++ b/src/psyclone/tests/utils_test.py @@ -357,4 +357,5 @@ def func(temp: bool, temp2: Union[bool, int]): # For second parameter temp2 if "temp2" == k: anno = stringify_annotation(v.annotation) - assert "typing.Union[bool, int]" == anno + # Python >= 3.14 uses the second format + assert "typing.Union[bool, int]" == anno or "bool | int" == anno