SmileyChris / easy-thumbnails

Easy thumbnails for Django
http://easy-thumbnails.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.39k stars 319 forks source link

DeprecationWarning from get_storage_class #616

Open lachlancannon opened 1 year ago

lachlancannon commented 1 year ago

As of Django 4.2. Not urgent, but a fix would be nice so we don't have to suppress the warning.

lachlancannon commented 1 year ago

e.g.

  File "/srv/venv/lib/python3.11/site-packages/easy_thumbnails/files.py", line 512, in get_thumbnail
    self.save_thumbnail(thumbnail)
  File "/srv/venv/lib/python3.11/site-packages/easy_thumbnails/files.py", line 531, in save_thumbnail
    self.thumbnail_storage.save(filename, thumbnail)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/venv/lib/python3.11/site-packages/django/utils/functional.py", line 266, in inner
    self._setup()
  File "/srv/venv/lib/python3.11/site-packages/easy_thumbnails/storage.py", line 27, in _setup
    self._wrapped = get_storage_class(
                    ^^^^^^^^^^^^^^^^^^
  File "/srv/venv/lib/python3.11/site-packages/django/core/files/storage/__init__.py", line 32, in get_storage_class
    warnings.warn(GET_STORAGE_CLASS_DEPRECATED_MSG, RemovedInDjango51Warning)
django.utils.deprecation.RemovedInDjango51Warning: django.core.files.storage.get_storage_class is deprecated in favor of using django.core.files.storage.storages.