From c98773897a7d913b2c32d87a1a47e7bf74555494 Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Fri, 27 Feb 2026 14:49:11 +0100 Subject: [PATCH] Run CI on Python 3.14 --- .github/workflows/build-wheels.yml | 18 +++++++++--------- .github/workflows/docs.yml | 2 +- .github/workflows/torch-tests.yml | 9 +++++++-- pyproject.toml | 3 ++- python/metatomic_torch/pyproject.toml | 2 ++ 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 8b1ec443..b7466313 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -64,11 +64,11 @@ jobs: - {torch-version: '2.3', cibw-python: 'cp312-*'} - {torch-version: '2.4', cibw-python: 'cp312-*'} - {torch-version: '2.5', cibw-python: 'cp312-*'} - - {torch-version: '2.6', cibw-python: 'cp312-*'} - - {torch-version: '2.7', cibw-python: 'cp312-*'} - - {torch-version: '2.8', cibw-python: 'cp312-*'} - - {torch-version: '2.9', cibw-python: 'cp312-*'} - - {torch-version: '2.10', cibw-python: 'cp312-*'} + - {torch-version: '2.6', cibw-python: 'cp313-*'} + - {torch-version: '2.7', cibw-python: 'cp313-*'} + - {torch-version: '2.8', cibw-python: 'cp313-*'} + - {torch-version: '2.9', cibw-python: 'cp314-*'} + - {torch-version: '2.10', cibw-python: 'cp314-*'} steps: - uses: actions/checkout@v6 with: @@ -77,7 +77,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install dependencies run: python -m pip install cibuildwheel @@ -145,7 +145,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install dependencies run: python -m pip install twine wheel @@ -196,7 +196,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install dependencies run: python -m pip install wheel build twine @@ -311,7 +311,7 @@ jobs: - name: setup Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: setup environment run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c17b46c..90e9ed35 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ jobs: - name: setup Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install dependencies run: | diff --git a/.github/workflows/torch-tests.yml b/.github/workflows/torch-tests.yml index 4aa30a9a..369b01e3 100644 --- a/.github/workflows/torch-tests.yml +++ b/.github/workflows/torch-tests.yml @@ -25,13 +25,18 @@ jobs: python-version: "3.10" torch-version: "2.10" - os: ubuntu-24.04 + # Keep a building with Python 3.13 since TorchScript is deprecated + # in Python 3.14 python-version: "3.13" torch-version: "2.10" + - os: ubuntu-24.04 + python-version: "3.14" + torch-version: "2.10" - os: macos-15 - python-version: "3.13" + python-version: "3.14" torch-version: "2.10" - os: windows-2022 - python-version: "3.13" + python-version: "3.14" torch-version: "2.10" steps: - uses: actions/checkout@v6 diff --git a/pyproject.toml b/pyproject.toml index 1a67cd6a..b2fbe861 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,12 +58,13 @@ omit = ["documentation.py"] ### ======================================================================== ### [tool.pytest.ini_options] -# ignore" a bunch of internal warnings with Python 3.13 and PyTorch filterwarnings = [ "error", + # internal warnings with Python 3.12+ and PyTorch "ignore:ast.Str is deprecated and will be removed in Python 3.14:DeprecationWarning", "ignore:Attribute s is deprecated and will be removed in Python 3.14:DeprecationWarning", "ignore:ast.NameConstant is deprecated and will be removed in Python 3.14:DeprecationWarning", + # TorchScript deprecation warnings "ignore:`torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`:DeprecationWarning", "ignore:`torch.jit.save` is deprecated. Please switch to `torch.export`:DeprecationWarning", "ignore:.*vesin.metatomic was only tested with metatomic.torch >=0.1.3,<0.2.*:UserWarning", diff --git a/python/metatomic_torch/pyproject.toml b/python/metatomic_torch/pyproject.toml index 5dbe99b7..3128c903 100644 --- a/python/metatomic_torch/pyproject.toml +++ b/python/metatomic_torch/pyproject.toml @@ -58,8 +58,10 @@ python_files = ["*.py"] testpaths = ["tests"] filterwarnings = [ "error", + # TorchScript deprecation warnings "ignore:`torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`:DeprecationWarning", "ignore:`torch.jit.save` is deprecated. Please switch to `torch.export`:DeprecationWarning", "ignore:`torch.jit.load` is deprecated. Please switch to `torch.export`:DeprecationWarning", + # Using vesin.metatomic with a developement version of metatomic "ignore:.*vesin.metatomic was only tested with metatomic.torch >=0.1.3,<0.2.*:UserWarning", ]