#1071644 Thumbnails of wallpapers missing due to incompatible python3-pil version

#1071644#5
Date:
2024-05-22 21:58:01 UTC
From:
To:
Hi,

in HydraPaper 3.3.1-2 running on Debian testing/trixie, the thumbnails
of wallpapers are not displayed and I get the following error:

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
Exception in thread Thread-19 (af):
Traceback (most recent call last):
   File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
     self.run()
   File "/usr/lib/python3.11/threading.py", line 982, in run
     self._target(*self._args, **self._kwargs)
   File
"/usr/lib/python3/dist-packages/hydrapaper/wallpaper_flowbox_item.py",
line 114, in af
     self.make_wallpaper_thumb(self.cache_path)
   File
"/usr/lib/python3/dist-packages/hydrapaper/wallpaper_flowbox_item.py",
line 150, in make_wallpaper_thumb
     thumb.thumbnail((250, 250), Image.ANTIALIAS)

The problem appears to be that Image.ANTIALIAS was removed from
python3-pil starting at version 10.0.0 as mentioned in
https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#constants.
I am using python3-pil 10.3.0-2, the version currently in trixie.

There is the new HydraPaper release 3.3.2 available upstream, which
seems to fix this issue via
https://gitlab.gnome.org/GabMus/HydraPaper/-/commit/780a7a8cba48219e1226b773d426bb8fcad8a1ce.
Would it be possible to update the Debian package to this version?

Best regards,
Nils

#1071644#10
Date:
2025-12-21 07:49:37 UTC
From:
To:
Dear Maintainer,

This bug still occurs in Debian Trixie with version 11.1.0-5+b1 of
python3-pil. Image.ANTIALIAS is not compatible with the included version
of python3-pil, and it has been recommended to use
Image.Resampling.LANCZOS instead. Below is a minimal patch that edits
one line and immediately restores compatibility.

Thank you for your work in maintaining this package.
--- /usr/lib/python3/dist-packages/hydrapaper/wallpaper_flowbox_item.py	2022-04-28 01:31:12.000000000 -0500
+++ wallpaper_flowbox_item.py	2025-12-21 01:40:10.092324044 -0600
@@ -147,7 +147,7 @@
             GLib.idle_add(
                 lambda: self.wp_image.set_tooltip_text(self.resolution)
             )
-            thumb.thumbnail((250, 250), Image.ANTIALIAS)
+            thumb.thumbnail((250, 250), Image.Resampling.LANCZOS)
             thumb.save(self.cache_path, 'PNG')
             thumb.close()
         except IOError:

#1071644#15
Date:
2026-01-08 20:14:28 UTC
From:
To:
Attached .debdiff file updates the package from 3.3.1-2 to 3.3.2 which
fixes the current issue with python3-pil. This package appears
unmaintained, and the provided debdiff should be suitable for an NMU.