From cc9fb88fa72a0e0bc0a7f0810c6e8185f5acda14 Mon Sep 17 00:00:00 2001 From: gnought <1684105+gnought@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:06:34 +0800 Subject: [PATCH] chore: bump pillow deps --- setup.py | 2 +- superset/utils/screenshots.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5173ad6dea708..593e77885310a 100644 --- a/setup.py +++ b/setup.py @@ -201,7 +201,7 @@ def get_git_sha() -> str: "thrift>=0.14.1, <1.0.0", ], "teradata": ["teradatasql>=16.20.0.23"], - "thumbnails": ["Pillow>=9.5.0, <10.0.0"], + "thumbnails": ["Pillow>=10.0.1, <11"], "vertica": ["sqlalchemy-vertica-python>=0.5.9, < 0.6"], "netezza": ["nzalchemy>=11.0.2"], "starrocks": ["starrocks>=1.0.0"], diff --git a/superset/utils/screenshots.py b/superset/utils/screenshots.py index 8609d65038273..bf6ed0f9e8493 100644 --- a/superset/utils/screenshots.py +++ b/superset/utils/screenshots.py @@ -201,7 +201,7 @@ def resize_image( logger.debug("Cropping to: %s*%s", str(img.size[0]), str(desired_width)) img = img.crop((0, 0, img.size[0], desired_width)) logger.debug("Resizing to %s", str(thumb_size)) - img = img.resize(thumb_size, Image.ANTIALIAS) + img = img.resize(thumb_size, Image.Resampling.LANCZOS) new_img = BytesIO() if output != "png": img = img.convert("RGB")