misc: use LANCZOS instead of PIL.Image.Antialias (#70634)

PIL.Image.Antialias is deprecated.
This commit is contained in:
Benjamin Dauvergne 2022-10-25 07:57:48 +02:00
parent 65e5a32250
commit 5c4318d707
2 changed files with 6 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class ProfileImageField(FileField):
box[3] += box[1]
image = image.crop(box)
return image.resize([width, height], PIL.Image.ANTIALIAS)
return image.resize([width, height], PIL.Image.LANCZOS)
class ValidatedEmailField(EmailField):

View File

@ -53,10 +53,14 @@ deps =
buster: django-model-utils<4
buster: django-select2>=5,<6
buster: dnspython==1.16.0
# impossible to compile old version of pillow on recent debian :/ or to install
# python3.6, the version of python on buster
# buster: pillow==5.4.1
bullseye: django<2.3
bullseye: django-model-utils<4
bullseye: dnspython==2.0.0
bullseye: django-select2>=5,<6
bullseye: pillow==8.1.2
stable-backports: django>=3.2.12,<3.3
stable-backports: django-model-utils>=4.2,<4.3
stable-backports: django-select2>=7.7,<7.8
@ -176,6 +180,7 @@ filterwarnings =
once:::authentic2.*
error:.*please use dns.resolver.resolve:DeprecationWarning:
error:.*Passing None for the middleware get_response argument is deprecated.*::
error:.*ANTIALIAS is deprecated and will be removed in Pillow 10::
junit_family=xunit2
[coverage:run]