From 5f854b4676b136333c20435957d1544208ab6ecb Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 14 Oct 2025 14:28:59 +0200 Subject: [PATCH 1/2] GitHub Actions: Add Python 3.14 and 3.14t to the testing https://www.python.org/downloads/release/python-3140/ Also (could be automated by Dependabot), * https://github.com/actions/checkout/releases * https://github.com/actions/setup-python/releases * https://github.com/actions/cache/releases --- .github/workflows/build_and_test.yml | 26 +++++++++++++------------- pyproject.toml | 12 ++++++------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index fdb9bde61..c2d3dd7fc 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -31,13 +31,13 @@ jobs: PIP_CACHE_DIR: ${{ github.workspace }}/.cache/pip steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 with: python-version: ${{ env.PRE_COMMIT_PYTHON_VERSION }} - name: Cache pip packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.PIP_CACHE_DIR }} key: ${{ runner.os }}-pip-${{ env.PRE_COMMIT_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }} @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-pip- - name: Cache pre-commit environments - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} @@ -80,14 +80,14 @@ jobs: run: shell: pwsh steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 with: python-version: ${{ env.PRE_COMMIT_PYTHON_VERSION }} - name: Cache pip packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.PIP_CACHE_DIR }} key: ${{ runner.os }}-pip-${{ env.PRE_COMMIT_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }} @@ -96,7 +96,7 @@ jobs: ${{ runner.os }}-pip- - name: Cache pre-commit environments - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} @@ -124,10 +124,10 @@ jobs: # Main job runs only if pre-commit succeeded main-job: strategy: - fail-fast: true + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python: ["3.10", "3.11", "3.12", "3.13"] + python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] package_name: ["pyrit"] package_extras: ["dev", "dev_all"] runs-on: ${{ matrix.os }} @@ -140,10 +140,10 @@ jobs: checks: write pull-requests: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 # Set up Python - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} @@ -151,7 +151,7 @@ jobs: # GitHub automatically handles cache eviction after 7 days of inactivity (or 10GB) # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows - name: Cache pip packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.PIP_CACHE_DIR }} key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ matrix.package_extras }}-${{ hashFiles('pyproject.toml') }} diff --git a/pyproject.toml b/pyproject.toml index f6910f7e8..2418a09a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] -requires-python = ">=3.10, <3.14" +requires-python = ">=3.10, <3.15" dependencies = [ "aioconsole>=0.8.1", "aiofiles>=24,<25", @@ -88,7 +88,7 @@ dev = [ "types-requests>=2.31.0.20250515", ] huggingface = [ - "torch>=2.7.0", + "torch>=2.7.0; python_version < '3.14'", # https://github.com/pytorch/pytorch/issues/156856 ] gcg = [ "accelerate>=1.7.0", @@ -97,7 +97,7 @@ gcg = [ "mlflow>=2.22.0", "ml-collections>=1.1.0", "sentencepiece>=0.2.0", - "torch>=2.7.0", + "torch>=2.7.0; python_version < '3.14'", # https://github.com/pytorch/pytorch/issues/156856 ] playwright = [ "flask>=3.1.0", @@ -110,7 +110,7 @@ gradio = [ "pywebview>=5.4" ] fairness_bias = [ - "spacy>=3.8.7", + "spacy>=3.8.7; python_version < '3.14'", # https://github.com/explosion/spaCy/pull/13870 ] opencv = [ "opencv-python>=4.11.0.86", @@ -136,9 +136,9 @@ all = [ "opencv-python>=4.11.0.86", "playwright>=1.49.0", "pywebview>=5.4", - "spacy>=3.8.7", + "spacy>=3.8.7; python_version < '3.14'", # https://github.com/explosion/spaCy/pull/13870 "rpyc>=6.0.1", - "torch>=2.7.0", + "torch>=2.7.0; python_version < '3.14'", # https://github.com/pytorch/pytorch/issues/156856 "types-PyYAML>=6.0.12.20250516", "types-requests>=2.31.0.20250515", ] From 4686ba066df3418250dc2a5fd45c82e6762184e8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 16 Oct 2025 04:07:39 +0200 Subject: [PATCH 2/2] Fix formatting of torch dependency in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2418a09a0..d631286fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ dev = [ "types-requests>=2.31.0.20250515", ] huggingface = [ - "torch>=2.7.0; python_version < '3.14'", # https://github.com/pytorch/pytorch/issues/156856 + "torch>=2.7.0; python_version < '3.14'", # https://github.com/pytorch/pytorch/issues/156856 ] gcg = [ "accelerate>=1.7.0",