From 2245fd09de9c358bce2cb7f6f49b3f9710229489 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 30 Apr 2025 07:54:07 +1000 Subject: [PATCH 1/8] Updated Ghostscript to 10.5.1 --- .github/workflows/test-windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index bf8ec2f2c..abbfd95c8 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -98,8 +98,8 @@ jobs: choco install nasm --no-progress echo "C:\Program Files\NASM" >> $env:GITHUB_PATH - choco install ghostscript --version=10.5.0 --no-progress - echo "C:\Program Files\gs\gs10.05.0\bin" >> $env:GITHUB_PATH + choco install ghostscript --version=10.5.1 --no-progress + echo "C:\Program Files\gs\gs10.05.1\bin" >> $env:GITHUB_PATH # Install extra test images xcopy /S /Y Tests\test-images\* Tests\images From d02f7868732cdacc227dd794f6ff84bd6f1858c9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 19:16:40 +1000 Subject: [PATCH 2/8] [pre-commit.ci] pre-commit autoupdate (#8944) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- .github/zizmor.yml | 7 +++++++ .pre-commit-config.yaml | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .github/zizmor.yml diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 000000000..5bdc48c30 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,7 @@ +# Configuration for the zizmor static analysis tool, run via pre-commit in CI +# https://woodruffw.github.io/zizmor/configuration/ +rules: + unpinned-uses: + config: + policies: + "*": ref-pin diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 140ce33be..e15e6f639 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.4 + rev: v0.11.8 hooks: - id: ruff args: [--exit-non-zero-on-fix] @@ -24,7 +24,7 @@ repos: exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$) - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v20.1.0 + rev: v20.1.3 hooks: - id: clang-format types: [c] @@ -51,14 +51,14 @@ repos: exclude: ^.github/.*TEMPLATE|^Tests/(fonts|images)/ - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.32.1 + rev: 0.33.0 hooks: - id: check-github-workflows - id: check-readthedocs - id: check-renovate - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.5.2 + rev: v1.6.0 hooks: - id: zizmor From c7193f74fc5ce1a0fe1742a0845165024be45ef5 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 8 May 2025 20:10:34 +1000 Subject: [PATCH 3/8] Updated error message --- Tests/test_image_resample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/test_image_resample.py b/Tests/test_image_resample.py index ce6209c0d..73b25ed51 100644 --- a/Tests/test_image_resample.py +++ b/Tests/test_image_resample.py @@ -462,7 +462,7 @@ class TestCoreResampleBox: im.resize((32, 32), resample, (20, 20, 20, 100)) im.resize((32, 32), resample, (20, 20, 100, 20)) - with pytest.raises(TypeError, match="must be sequence of length 4"): + with pytest.raises(TypeError, match="must be (sequence|tuple) of length 4"): im.resize((32, 32), resample, (im.width, im.height)) # type: ignore[arg-type] with pytest.raises(ValueError, match="can't be negative"): From 71a916ad53502ed8cb8ea71c40081c169c3eae0f Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 8 May 2025 22:10:22 +1000 Subject: [PATCH 4/8] Do not install PyQt6 on Python 3.14 --- .github/workflows/test-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index bf8ec2f2c..12f06ee03 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -84,7 +84,7 @@ jobs: python3 -m pip install --upgrade pip - name: Install CPython dependencies - if: "!contains(matrix.python-version, 'pypy') && matrix.architecture != 'x86'" + if: "!contains(matrix.python-version, 'pypy') && !contains(matrix.python-version, '3.14') && matrix.architecture != 'x86'" run: | python3 -m pip install PyQt6 From 215069af5ddec6f4d3b92b8bc7554a10e2efb669 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 8 May 2025 22:13:13 +1000 Subject: [PATCH 5/8] Added support for Python 3.14 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5ecd6b816..5d41e27d9 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ WEBP_ROOT = None ZLIB_ROOT = None FUZZING_BUILD = "LIB_FUZZING_ENGINE" in os.environ -if sys.platform == "win32" and sys.version_info >= (3, 14): +if sys.platform == "win32" and sys.version_info >= (3, 15): import atexit atexit.register( From c64a7b50983d64b15bc8551315e28f4ac0cd8e84 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 13 May 2025 07:41:00 +1000 Subject: [PATCH 6/8] Updated harfbuzz to 11.2.1 --- .github/workflows/wheels-dependencies.sh | 2 +- winbuild/build_prepare.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index a4592871f..a6b52064c 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -38,7 +38,7 @@ ARCHIVE_SDIR=pillow-depends-main # Package versions for fresh source builds FREETYPE_VERSION=2.13.3 -HARFBUZZ_VERSION=11.1.0 +HARFBUZZ_VERSION=11.2.1 LIBPNG_VERSION=1.6.47 JPEGTURBO_VERSION=3.1.0 OPENJPEG_VERSION=2.5.3 diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 17fc37572..fbe479291 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -113,7 +113,7 @@ V = { "BROTLI": "1.1.0", "FREETYPE": "2.13.3", "FRIBIDI": "1.0.16", - "HARFBUZZ": "11.1.0", + "HARFBUZZ": "11.2.1", "JPEGTURBO": "3.1.0", "LCMS2": "2.17", "LIBAVIF": "1.2.1", From efa2288643a3d2840b573d14b1aec41f6fd2b80c Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 15 May 2025 08:38:33 +1000 Subject: [PATCH 7/8] Updated libavif to 1.3.0 --- Tests/test_file_avif.py | 2 +- depends/install_libavif.sh | 2 +- winbuild/build_prepare.py | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index bd87947c0..b2e586637 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -233,7 +233,7 @@ class TestFileAvif: with Image.open(out_gif) as reread: reread_value = reread.convert("RGB").getpixel((1, 1)) difference = sum([abs(original_value[i] - reread_value[i]) for i in range(3)]) - assert difference <= 3 + assert difference <= 6 def test_save_single_frame(self, tmp_path: Path) -> None: temp_file = tmp_path / "temp.avif" diff --git a/depends/install_libavif.sh b/depends/install_libavif.sh index fc10d3e54..26af8a36c 100755 --- a/depends/install_libavif.sh +++ b/depends/install_libavif.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -eo pipefail -version=1.2.1 +version=1.3.0 ./download-and-extract.sh libavif-$version https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$version.tar.gz diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 17fc37572..9fee5bd90 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -116,7 +116,7 @@ V = { "HARFBUZZ": "11.1.0", "JPEGTURBO": "3.1.0", "LCMS2": "2.17", - "LIBAVIF": "1.2.1", + "LIBAVIF": "1.3.0", "LIBIMAGEQUANT": "4.3.4", "LIBPNG": "1.6.47", "LIBWEBP": "1.5.0", @@ -399,7 +399,6 @@ DEPS: dict[str, dict[str, Any]] = { "-DAVIF_CODEC_DAV1D=LOCAL", "-DAVIF_CODEC_RAV1E=LOCAL", "-DAVIF_CODEC_SVT=LOCAL", - "-DCMAKE_POLICY_VERSION_MINIMUM=3.5", ), cmd_xcopy("include", "{inc_dir}"), ], From 7824d2f8c61648c6ea0185b50e55df1a71213168 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 23 May 2025 08:48:38 +1000 Subject: [PATCH 8/8] Update rust when building libavif --- winbuild/build_prepare.py | 1 + 1 file changed, 1 insertion(+) diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 9fee5bd90..6cdcf6f0d 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -389,6 +389,7 @@ DEPS: dict[str, dict[str, Any]] = { "filename": f"libavif-{V['LIBAVIF']}.zip", "license": "LICENSE", "build": [ + "rustup update", f"{sys.executable} -m pip install meson", *cmds_cmake( "avif_static",