amol- / depot

Toolkit for storing files and attachments in web applications
MIT License
161 stars 41 forks source link

Deprecation warning: Image.BILINEAR (pillow >=9.1.0) #75

Open paulgoetze opened 2 years ago

paulgoetze commented 2 years ago

Thanks for the development & maintenance of the filedepot package!

I recently started seeing this deprecation warning when using the WithThumbnailFilter class with pillow v9.2.0 (I'm running on Python 3.10.7):

lib/python3.10/site-packages/depot/fields/filters/thumbnails.py:37: DeprecationWarning: 
BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
    thumbnail.thumbnail(self.thumbnail_size, Image.BILINEAR)

It looks like Image.BILINEAR was deprecated in pillow 9.1.0 in favour of Image.Resampling.BILINEAR.

amol- commented 1 year ago

If you are willing to contribute a PR to address those warnings I'll gladly take a look at it 👍

paulgoetze commented 1 year ago

Thanks @amol-, I'll try and prepare a PR in the next days.

amol- commented 8 months ago

Were those deprecation retired? It seems that in Pillow 10.2.0 Image.BILINEAR doesn't raise any deprecation warning