matthewwithanm / pilkit

Utilities and processors built for, and on top of PIL
BSD 3-Clause "New" or "Revised" License
196 stars 54 forks source link

DeprecationWarning for Pillow 10 on the deprecated use of ANTIALIAS #59

Closed jberends closed 1 year ago

jberends commented 2 years ago

with reference to a warning in our CI.

source location: https://github.com/matthewwithanm/pilkit/blob/09ffa2ad33318ae5fd3464655c14c7f01ffc2097/pilkit/processors/resize.py#L25

DeprecationWarning: ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
    img = img.resize((self.width, self.height), Image.ANTIALIAS)
newearthmartin commented 2 years ago

Hi! I'm also getting these deprecation warnings:

pilkit/processors/base.py:119: DeprecationWarning: FLIP_LEFT_RIGHT is deprecated and will be removed in Pillow 10 (2023-07-01). Use Transpose.FLIP_LEFT_RIGHT instead.
  FLIP_HORIZONTAL = Image.FLIP_LEFT_RIGHT

pilkit/processors/base.py:120: DeprecationWarning: FLIP_TOP_BOTTOM is deprecated and will be removed in Pillow 10 (2023-07-01). Use Transpose.FLIP_TOP_BOTTOM instead.
  FLIP_VERTICAL = Image.FLIP_TOP_BOTTOM

pilkit/processors/base.py:121: DeprecationWarning: ROTATE_90 is deprecated and will be removed in Pillow 10 (2023-07-01). Use Transpose.ROTATE_90 instead.
  ROTATE_90 = Image.ROTATE_90

pilkit/processors/base.py:122: DeprecationWarning: ROTATE_180 is deprecated and will be removed in Pillow 10 (2023-07-01). Use Transpose.ROTATE_180 instead.
  ROTATE_180 = Image.ROTATE_180

pilkit/processors/base.py:123: DeprecationWarning: ROTATE_270 is deprecated and will be removed in Pillow 10 (2023-07-01). Use Transpose.ROTATE_270 instead.
  ROTATE_270 = Image.ROTATE_270
newearthmartin commented 2 years ago

Here is a full list of constants that will be deprecated: https://pillow.readthedocs.io/en/stable/deprecations.html#constants

jberends commented 1 year ago

@matthewwithanm can we support you in updating this package on PyPI? What is needed for you to get this out to the public?

jberends commented 1 year ago

@newearthmartin It seems that the constants you mention which were originally deprecated in 9.1 are not deprecated in Pillow 9.4 above anymore.

See: https://pillow.readthedocs.io/en/stable/releasenotes/9.4.0.html#constants

newearthmartin commented 1 year ago

Effectively, these warnings have disappeared after upgrading Pillow.

jberends commented 1 year ago

see also #64

It seems that no-one is really responding here to these issues for a while.

@matthewwithanm @vstoykov @dmarler

newearthmartin commented 1 year ago

Maybe the owners would like to transfer this repo to Jazzband. It is a collaborative community to maintain Python projects.

Please consider this to keep the project alive 🙏 This way the project keeps going without depending on a single person's availabilty.

@matthewwithanm @vstoykov @dmarler

vstoykov commented 1 year ago

This should be fixed by #70

vstoykov commented 1 year ago

New release is made available in PyPi with the fix