From a999c16bc60826ddb987ba83f71f40fe46a1d1bd Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 16 Oct 2025 14:59:37 +0200 Subject: [PATCH 1/7] Drop support for Python 3.9 --- .github/workflows/test.yml | 2 +- README.md | 2 +- docs/changelog.rst | 1 + pyproject.toml | 5 ++--- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f118b8..bd248ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: needs: lint strategy: matrix: - python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 - name: Install optimizers diff --git a/README.md b/README.md index 33cb803..7423b79 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ It converts the image between the libraries when necessary. Willow currently has basic resize and crop operations, face and feature detection and animated GIF support. New operations and library integrations can also be [easily implemented](https://willow.wagtail.org/latest/guide/extend.html). -The library is written in pure Python and supports versions 3.9, 3.10, 3.11, 3.12, and 3.13. +The library is written in pure Python and supports versions 3.10, 3.11, 3.12, and 3.13. ## Examples diff --git a/docs/changelog.rst b/docs/changelog.rst index 03a632b..6eb1398 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,7 @@ Changelog ------------------- - Add provisional support for Python 3.14 pending its general release (Storm Heg) +- Drop support for Python 3.9 (Storm Heg) 1.11.0 (2025-07-16) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 8d20468..8fca0f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,6 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -25,7 +24,7 @@ classifiers = [ ] dynamic = ["version"] # will read __version__ from willow/__init__.py -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ "filetype>=1.0.10,!=1.1.0", "defusedxml>=0.7,<1.0", @@ -117,7 +116,7 @@ exclude_lines = [ ] [tool.ruff] -target-version = "py39" # minimum target version +target-version = "py310" # minimum target version # E501: Line too long lint.ignore = ["E501"] From 0ddaab371b11a5ffd4becc3e5a5db32da33f291e Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 16 Oct 2025 15:00:59 +0200 Subject: [PATCH 2/7] Support for Python 3.14 is no longer provisional --- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- README.md | 2 +- docs/changelog.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 96c1a8a..362513a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" cache-dependency-path: "**/pyproject.toml" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd248ad..dda0ca1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ env: TOX_TESTENV_PASSENV: FORCE_COLOR PIP_DISABLE_PIP_VERSION_CHECK: "1" COVERAGE_CORE: sysmon # Only supported on Python 3.12+, ignore on older versions - PYTHON_LATEST: "3.13" + PYTHON_LATEST: "3.14" jobs: lint: diff --git a/README.md b/README.md index 7423b79..4c62368 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ It converts the image between the libraries when necessary. Willow currently has basic resize and crop operations, face and feature detection and animated GIF support. New operations and library integrations can also be [easily implemented](https://willow.wagtail.org/latest/guide/extend.html). -The library is written in pure Python and supports versions 3.10, 3.11, 3.12, and 3.13. +The library is written in pure Python and supports versions 3.10, 3.11, 3.12, 3.13 and 3.14. ## Examples diff --git a/docs/changelog.rst b/docs/changelog.rst index 6eb1398..01cbf2d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,7 +4,7 @@ Changelog 1.12.0 (UNRELEASED) ------------------- -- Add provisional support for Python 3.14 pending its general release (Storm Heg) +- Add support for Python 3.14 (Storm Heg) - Drop support for Python 3.9 (Storm Heg) 1.11.0 (2025-07-16) From 7ebbe30b34c87fc6430d61d261c42c628d6bf79d Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 16 Oct 2025 15:02:40 +0200 Subject: [PATCH 3/7] Simplify pillow-heif requirement and raise it to 1.0.0 --- docs/changelog.rst | 1 + pyproject.toml | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 01cbf2d..ebb740a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,7 @@ Changelog - Add support for Python 3.14 (Storm Heg) - Drop support for Python 3.9 (Storm Heg) +- The minimum required pillow-heif version is now 1.0.0 (Storm Heg) 1.11.0 (2025-07-16) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 8fca0f1..094bf37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,10 +33,7 @@ dependencies = [ [project.optional-dependencies] pillow = ["Pillow>=11.3.0,<12.0.0"] wand = ["Wand>=0.6,<1.0"] -heif = [ - "pillow-heif>=0.10.0; python_version < '3.12'", - "pillow-heif>=0.13.0; python_version >= '3.12'", -] +heif = ["pillow-heif>=1.0.0"] testing = [ "willow[pillow,wand,heif]", From e59170975a93444e77657ea95a5a8158de622e41 Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 16 Oct 2025 15:03:27 +0200 Subject: [PATCH 4/7] Allow installing Pillow 12.x --- docs/changelog.rst | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index ebb740a..ccb49bb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,7 @@ Changelog - Add support for Python 3.14 (Storm Heg) - Drop support for Python 3.9 (Storm Heg) - The minimum required pillow-heif version is now 1.0.0 (Storm Heg) +- Add support for Pillow 12 (Storm Heg) 1.11.0 (2025-07-16) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 094bf37..4fd95e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ ] [project.optional-dependencies] -pillow = ["Pillow>=11.3.0,<12.0.0"] +pillow = ["Pillow>=11.3.0,<13.0.0"] wand = ["Wand>=0.6,<1.0"] heif = ["pillow-heif>=1.0.0"] From 7af422c975744af85adfae1211247e9211a3216a Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 16 Oct 2025 15:05:28 +0200 Subject: [PATCH 5/7] Update pre-commit hooks --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bee04aa..cb2c904 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ exclude: "^tests/images/" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -15,13 +15,13 @@ repos: - id: check-yaml - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.1" + rev: "v0.14.0" hooks: - - id: ruff + - id: ruff-check args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/pycontribs/mirrors-prettier - rev: v3.3.3 + rev: v3.6.2 hooks: - id: prettier types_or: [json, yaml, markdown, bash, editorconfig, toml] From a61f59a24e86f48eb7a9f5f31dea49e8ef9e803b Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Thu, 16 Oct 2025 15:26:32 +0200 Subject: [PATCH 6/7] Upgrade GitHub actions --- .github/workflows/publish.yml | 6 +++--- .github/workflows/test.yml | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 362513a..96d8702 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,11 +11,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: "3.14" cache: "pip" @@ -43,7 +43,7 @@ jobs: # Mandatory for trusted publishing id-token: write steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 - name: 🚀 Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dda0ca1..ffbad2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,10 +18,10 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ env.PYTHON_LATEST }} - uses: pre-commit/action@v3.0.1 @@ -34,12 +34,12 @@ jobs: matrix: python: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install optimizers run: | sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} allow-prereleases: true @@ -65,14 +65,14 @@ jobs: needs: test steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ env.PYTHON_LATEST }} cache: pip - name: Download coverage data - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: pattern: coverage-data-* merge-multiple: true From f0d64c02b54106172d0c047a52f71ac409f4271c Mon Sep 17 00:00:00 2001 From: "Storm B. Heg" Date: Sat, 18 Oct 2025 13:12:00 +0200 Subject: [PATCH 7/7] Drop Pillow upper bound Discussed with the Wagtail core team. For a good overview of why, this article is pretty good: https://iscinumpy.dev/post/bound-version-constraints/#tldr --- docs/changelog.rst | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index ccb49bb..deffac7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,7 +7,7 @@ Changelog - Add support for Python 3.14 (Storm Heg) - Drop support for Python 3.9 (Storm Heg) - The minimum required pillow-heif version is now 1.0.0 (Storm Heg) -- Add support for Pillow 12 (Storm Heg) +- Add support for Pillow 12 and beyond, removed hard upper bound (Storm Heg) 1.11.0 (2025-07-16) ------------------- diff --git a/pyproject.toml b/pyproject.toml index 4fd95e1..ba5fcd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ dependencies = [ ] [project.optional-dependencies] -pillow = ["Pillow>=11.3.0,<13.0.0"] +pillow = ["Pillow>=11.3.0"] wand = ["Wand>=0.6,<1.0"] heif = ["pillow-heif>=1.0.0"]