I have encountered the same error when running tests locally, but only
seen it once and could not reproduce it.

But when running a test against against pillow 10.0.0-1 the following
error occurs[1]

======================================================================
FAIL: test_process_apk (__main__.UpdateTest.test_process_apk)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autopkgtest.V6tBlg/build.2CL/real-tree/tests/update.TestCase",
line 949, in test_procesk
    self.assertTrue(os.path.isfile(icon_path))
AssertionError: False is not true

It is already fixed upstream[2].

The attached patch contains the fix.

Thank you for considering the patch.

[1] 
https://autopkgtest.ubuntu.com/results/autopkgtest-mantic/mantic/amd64/f/fdroidserver/20230707_143232_ec734@/log.gz
[2] 
https://github.com/f-droid/fdroidserver/commit/132e953c8c9f7d709586442aee6ff474cfa8fa18
Description: do not use deprecated Image.ANTIALIAS attribute
 The ANTIALIAS alias was removed in Pillow 10.0.0:
 https://pillow.readthedocs.io/en/stable/deprecations.html
Author: Hans-Christoph Steiner <h...@eds.org>
Origin: upstream
Bug: https://github.com/f-droid/fdroidserver/commit/132e953c8c9f7d709586442aee6ff474cfa8fa18
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040629
Last-Update: 2023-07-19
--- a/fdroidserver/update.py
+++ b/fdroidserver/update.py
@@ -250,7 +250,7 @@
 
         if any(length > size for length in im.size):
             oldsize = im.size
-            im.thumbnail((size, size), Image.ANTIALIAS)
+            im.thumbnail((size, size), Image.Resampling.LANCZOS)
             logging.debug("%s was too large at %s - new size is %s" % (
                 iconpath, oldsize, im.size))
             im.save(iconpath, "PNG", optimize=True,
@@ -1757,7 +1757,7 @@
 
             size = dpi_to_px(density)
 
-            im.thumbnail((size, size), Image.ANTIALIAS)
+            im.thumbnail((size, size), Image.Resampling.LANCZOS)
             im.save(icon_path, "PNG", optimize=True,
                     pnginfo=BLANK_PNG_INFO, icc_profile=None)
             empty_densities.remove(density)

Reply via email to