From d0474afdfe94eb35580e844ffcdcc6c46259cf05 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 5 Apr 2022 09:57:11 +0200 Subject: [PATCH] Fix further Pillow compatibility issues --- src/pretix/helpers/reportlab.py | 4 ++-- src/setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pretix/helpers/reportlab.py b/src/pretix/helpers/reportlab.py index 517c3221d..c38a6de89 100644 --- a/src/pretix/helpers/reportlab.py +++ b/src/pretix/helpers/reportlab.py @@ -19,7 +19,7 @@ # You should have received a copy of the GNU Affero General Public License along with this program. If not, see # . # -from PIL.Image import BICUBIC +from PIL.Image import Resampling from reportlab.lib.utils import ImageReader @@ -31,7 +31,7 @@ class ThumbnailingImageReader(ImageReader): height = width * self._image.size[1] / self._image.size[0] self._image.thumbnail( size=(int(width * dpi / 72), int(height * dpi / 72)), - resample=BICUBIC + resample=Resampling.BICUBIC ) self._data = None return width, height diff --git a/src/setup.py b/src/setup.py index a4c7ecaa4..f0b798fcf 100644 --- a/src/setup.py +++ b/src/setup.py @@ -205,7 +205,7 @@ setup( 'packaging', 'paypalrestsdk==1.13.*', 'phonenumberslite==8.12.*', - 'Pillow==9.*', + 'Pillow==9.1.*', 'protobuf==3.19.*', 'psycopg2-binary', 'pycountry',