Skip to content

Commit 2c02f93

Browse files
authored
Maintenance | add Pillow 12 support | drop Python 3.9 (#177)
2 parents f6f2105 + f0d64c0 commit 2c02f93

File tree

6 files changed

+26
-27
lines changed

6 files changed

+26
-27
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
with:
1616
fetch-depth: 0
1717

18-
- uses: actions/setup-python@v5
18+
- uses: actions/setup-python@v6
1919
with:
20-
python-version: "3.13"
20+
python-version: "3.14"
2121
cache: "pip"
2222
cache-dependency-path: "**/pyproject.toml"
2323

@@ -43,7 +43,7 @@ jobs:
4343
# Mandatory for trusted publishing
4444
id-token: write
4545
steps:
46-
- uses: actions/download-artifact@v4
46+
- uses: actions/download-artifact@v5
4747

4848
- name: 🚀 Publish package distributions to PyPI
4949
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ env:
1212
TOX_TESTENV_PASSENV: FORCE_COLOR
1313
PIP_DISABLE_PIP_VERSION_CHECK: "1"
1414
COVERAGE_CORE: sysmon # Only supported on Python 3.12+, ignore on older versions
15-
PYTHON_LATEST: "3.13"
15+
PYTHON_LATEST: "3.14"
1616

1717
jobs:
1818
lint:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
with:
2323
fetch-depth: 0
24-
- uses: actions/setup-python@v5
24+
- uses: actions/setup-python@v6
2525
with:
2626
python-version: ${{ env.PYTHON_LATEST }}
2727
- uses: pre-commit/[email protected]
@@ -32,14 +32,14 @@ jobs:
3232
needs: lint
3333
strategy:
3434
matrix:
35-
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
35+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v5
3838
- name: Install optimizers
3939
run: |
4040
sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp
4141
- name: Set up Python ${{ matrix.python }}
42-
uses: actions/setup-python@v5
42+
uses: actions/setup-python@v6
4343
with:
4444
python-version: ${{ matrix.python }}
4545
allow-prereleases: true
@@ -65,14 +65,14 @@ jobs:
6565
needs: test
6666

6767
steps:
68-
- uses: actions/checkout@v4
69-
- uses: actions/setup-python@v5
68+
- uses: actions/checkout@v5
69+
- uses: actions/setup-python@v6
7070
with:
7171
python-version: ${{ env.PYTHON_LATEST }}
7272
cache: pip
7373

7474
- name: Download coverage data
75-
uses: actions/download-artifact@v4
75+
uses: actions/download-artifact@v5
7676
with:
7777
pattern: coverage-data-*
7878
merge-multiple: true

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
exclude: "^tests/images/"
66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v5.0.0
8+
rev: v6.0.0
99
hooks:
1010
- id: trailing-whitespace
1111
- id: end-of-file-fixer
@@ -15,13 +15,13 @@ repos:
1515
- id: check-yaml
1616
- id: debug-statements
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: "v0.7.1"
18+
rev: "v0.14.0"
1919
hooks:
20-
- id: ruff
20+
- id: ruff-check
2121
args: [--fix, --exit-non-zero-on-fix]
2222
- id: ruff-format
2323
- repo: https://github.com/pycontribs/mirrors-prettier
24-
rev: v3.3.3
24+
rev: v3.6.2
2525
hooks:
2626
- id: prettier
2727
types_or: [json, yaml, markdown, bash, editorconfig, toml]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It converts the image between the libraries when necessary.
1616
Willow currently has basic resize and crop operations, face and feature detection and animated GIF support.
1717
New operations and library integrations can also be [easily implemented](https://willow.wagtail.org/latest/guide/extend.html).
1818

19-
The library is written in pure Python and supports versions 3.9, 3.10, 3.11, 3.12, and 3.13.
19+
The library is written in pure Python and supports versions 3.10, 3.11, 3.12, 3.13 and 3.14.
2020

2121
## Examples
2222

docs/changelog.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Changelog
44
1.12.0 (UNRELEASED)
55
-------------------
66

7-
- Add provisional support for Python 3.14 pending its general release (Storm Heg)
7+
- Add support for Python 3.14 (Storm Heg)
8+
- Drop support for Python 3.9 (Storm Heg)
9+
- The minimum required pillow-heif version is now 1.0.0 (Storm Heg)
10+
- Add support for Pillow 12 and beyond, removed hard upper bound (Storm Heg)
811

912
1.11.0 (2025-07-16)
1013
-------------------

pyproject.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ classifiers = [
1616
"Programming Language :: Python",
1717
"Programming Language :: Python :: 3",
1818
"Programming Language :: Python :: 3 :: Only",
19-
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",
2221
"Programming Language :: Python :: 3.12",
@@ -25,19 +24,16 @@ classifiers = [
2524
]
2625

2726
dynamic = ["version"] # will read __version__ from willow/__init__.py
28-
requires-python = ">=3.9"
27+
requires-python = ">=3.10"
2928
dependencies = [
3029
"filetype>=1.0.10,!=1.1.0",
3130
"defusedxml>=0.7,<1.0",
3231
]
3332

3433
[project.optional-dependencies]
35-
pillow = ["Pillow>=11.3.0,<12.0.0"]
34+
pillow = ["Pillow>=11.3.0"]
3635
wand = ["Wand>=0.6,<1.0"]
37-
heif = [
38-
"pillow-heif>=0.10.0; python_version < '3.12'",
39-
"pillow-heif>=0.13.0; python_version >= '3.12'",
40-
]
36+
heif = ["pillow-heif>=1.0.0"]
4137

4238
testing = [
4339
"willow[pillow,wand,heif]",
@@ -117,7 +113,7 @@ exclude_lines = [
117113
]
118114

119115
[tool.ruff]
120-
target-version = "py39" # minimum target version
116+
target-version = "py310" # minimum target version
121117

122118
# E501: Line too long
123119
lint.ignore = ["E501"]

0 commit comments

Comments
 (0)