etianen / django-s3-storage

Django Amazon S3 file storage.
BSD 3-Clause "New" or "Revised" License
414 stars 94 forks source link

Django 4.1: stop using Django's `utc` alias in favour of directly using `datetime.timezone.utc` #144

Closed kevinmarsh closed 2 years ago

kevinmarsh commented 2 years ago

I noticed when starting to test out Django 4.1 that Django is now warning:

django_s3_storage/storage.py:28: RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated. Please update your code to use datetime.timezone.utc instead.

For reference, prior to Django 4, django.utils.timezone.utc was just an alias to pytz.utc and from Django 4 onward it is an alias to datetime.timezone.utc

etianen commented 2 years ago

Thank you! I'll get this in a release ASAP