From 299cff3ff7832015d726026adbff181fdeb982c1 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 7 Jul 2025 11:05:49 +0000 Subject: [PATCH] copyparty.exe: update pillow --- README.md | 4 ++-- copyparty/th_srv.py | 6 ++++++ docs/devnotes.md | 2 +- scripts/pyinstaller/build.sh | 1 + scripts/pyinstaller/deps.sha512 | 2 +- scripts/pyinstaller/notes.txt | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b5c0b654..fbe3b8e2 100644 --- a/README.md +++ b/README.md @@ -2727,7 +2727,7 @@ enable [thumbnails](#thumbnails) of... * **images:** `Pillow` and/or `pyvips` and/or `ffmpeg` (requires py2.7 or py3.5+) * **videos/audio:** `ffmpeg` and `ffprobe` somewhere in `$PATH` * **HEIF pictures:** `pyvips` or `ffmpeg` or `pyheif-pillow-opener` (requires Linux or a C compiler) -* **AVIF pictures:** `pyvips` or `ffmpeg` or `pillow-avif-plugin` +* **AVIF pictures:** `pyvips` or `ffmpeg` or `pillow-avif-plugin` or pillow v11.3+ * **JPEG XL pictures:** `pyvips` or `ffmpeg` enable sending [zeromq messages](#zeromq) from event-hooks: `pyzmq` @@ -2758,7 +2758,7 @@ set any of the following environment variables to disable its associated optiona | `PRTY_NO_MUTAGEN` | do not use [mutagen](https://pypi.org/project/mutagen/) for reading metadata from media files; will fallback to ffprobe | | `PRTY_NO_PIL` | disable all [Pillow](https://pypi.org/project/pillow/)-based thumbnail support; will fallback to libvips or ffmpeg | | `PRTY_NO_PILF` | disable Pillow `ImageFont` text rendering, used for folder thumbnails | -| `PRTY_NO_PIL_AVIF` | disable 3rd-party Pillow plugin for [AVIF support](https://pypi.org/project/pillow-avif-plugin/) | +| `PRTY_NO_PIL_AVIF` | disable Pillow avif support (internal and/or [plugin](https://pypi.org/project/pillow-avif-plugin/)) | | `PRTY_NO_PIL_HEIF` | disable 3rd-party Pillow plugin for [HEIF support](https://pypi.org/project/pyheif-pillow-opener/) | | `PRTY_NO_PIL_WEBP` | disable use of native webp support in Pillow | | `PRTY_NO_PSUTIL` | do not use [psutil](https://pypi.org/project/psutil/) for reaping stuck hooks and plugins on Windows | diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index e49ade63..2ccba677 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -96,6 +96,12 @@ try: if os.environ.get("PRTY_NO_PIL_AVIF"): raise Exception() + from PIL import features as piltures + + if piltures.check("avif"): + HAVE_AVIF = True + raise Exception() + import pillow_avif # noqa: F401 # pylint: disable=unused-import HAVE_AVIF = True diff --git a/docs/devnotes.md b/docs/devnotes.md index b4355f4c..3db6b201 100644 --- a/docs/devnotes.md +++ b/docs/devnotes.md @@ -355,7 +355,7 @@ pip install mutagen # audio metadata pip install pyftpdlib # ftp server pip install partftpy # tftp server pip install impacket # smb server -- disable Windows Defender if you REALLY need this on windows -pip install Pillow pyheif-pillow-opener pillow-avif-plugin # thumbnails +pip install Pillow pyheif-pillow-opener # thumbnails pip install pyvips # faster thumbnails pip install psutil # better cleanup of stuck metadata parsers on windows pip install black==21.12b0 click==8.0.2 bandit pylint flake8 isort mypy # vscode tooling diff --git a/scripts/pyinstaller/build.sh b/scripts/pyinstaller/build.sh index 099bb464..bb1d477e 100644 --- a/scripts/pyinstaller/build.sh +++ b/scripts/pyinstaller/build.sh @@ -95,6 +95,7 @@ excl=( _pyrepl distutils setuptools + PIL._avif PIL.ImageQt PIL.ImageShow PIL.ImageTk diff --git a/scripts/pyinstaller/deps.sha512 b/scripts/pyinstaller/deps.sha512 index 49f30769..b698b95a 100644 --- a/scripts/pyinstaller/deps.sha512 +++ b/scripts/pyinstaller/deps.sha512 @@ -27,7 +27,7 @@ ac96786e5d35882e0c5b724794329c9125c2b86ae7847f17acfc49f0d294312c6afc1c3f248655de 00731cfdd9d5c12efef04a7161c90c1e5ed1dc4677aa88a1d4054aff836f3430df4da5262ed4289c21637358a9e10e5df16f76743cbf5a29bb3a44b146c19cf3 MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl 8a6e2b13a2ec4ef914a5d62aad3db6464d45e525a82e07f6051ed10474eae959069e165dba011aefb8207cdfd55391d73d6f06362c7eb247b08763106709526e mutagen-1.47.0-py3-none-any.whl a726fb46cce24f781fc8b55a3e6dea0a884ebc3b2b400ea74aa02333699f4955a5dc1e2ec5927ac72f35a624401f3f3b442882ba1cc4cadaf9c88558b5b8bdae packaging-25.0-py3-none-any.whl -9265164114db16c7f4286f188d6ebc7f3e2c9a9aca7144f92bc66c320d7d5db44e2c3a93e5e8f8cc12b8ffb30d0402a9510716ed7dbd10df39d19f5cf7ed7486 pillow-11.2.1-cp313-cp313-win_amd64.whl +3e39ea6e16b502d99a2e6544579095d0f7c6097761cd85135d5e929b9dec1b32e80669a846f94ee8c2cca9be2f5fe728625d09453988864c04e16bb8445c3f91 pillow-11.3.0-cp313-cp313-win_amd64.whl 59fbbcae044f4ee73d203ac74b553b27bfad3e6b2f3fb290fd3f8774753c6b545176b6b3399c240b092d131d152290ce732750accd962dc1e48e930be85f5e53 pyinstaller-6.14.1-py3-none-win_amd64.whl fc6f3e144c5f5b662412de07cb8bf0c2eb3b3be21d19ec448aef3c4244d779b9ab8027fd67a4871e6e13823b248ea0f5a7a9241a53aef30f3b51a6d3cb5bdb3f pyinstaller_hooks_contrib-2025.5-py3-none-any.whl 2c7a52e223b8186c21009d3fa5ed6a856d8eb4ef3b98f5d24c378c6a1afbfa1378bd7a51d6addc500e263d7989efb544c862bf920055e740f137c702dfd9d18b python-3.13.5-amd64.exe diff --git a/scripts/pyinstaller/notes.txt b/scripts/pyinstaller/notes.txt index 3a490381..61f76fa4 100644 --- a/scripts/pyinstaller/notes.txt +++ b/scripts/pyinstaller/notes.txt @@ -37,7 +37,7 @@ fns=( MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl mutagen-1.47.0-py3-none-any.whl packaging-25.0-py3-none-any.whl - pillow-11.2.1-cp313-cp313-win_amd64.whl + pillow-11.3.0-cp313-cp313-win_amd64.whl pyinstaller-6.14.1-py3-none-win_amd64.whl pyinstaller_hooks_contrib-2025.5-py3-none-any.whl python-3.13.5-amd64.exe