matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.24k stars 276 forks source link

django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy() #531

Closed abdulwahidgul24085 closed 2 years ago

abdulwahidgul24085 commented 2 years ago

There is a RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy() warnings when running tests on Django 3. The location for this error is in the following section /imagekit/admin.py on line 10.

Solution is simply

from django.utils.translation import gettext_lazy as _

Is it ok if I create a pull request and merge this? Or your team isn't supporting Django version 3 at the moment?

vstoykov commented 2 years ago

Hello and thank you for your contribution.

We are currently supporting Django 3 and under Django 3 there is no problem with ImageKit. The problem will occur when Django 4 comes out as the warning message is saying. And as we know Django 4 will come December this year it is better we to be prepared for that. I'll be glad if you prepare a PR for this change.

q0w commented 2 years ago

But its already implemented by #512

vstoykov commented 2 years ago

Yes. as @q0w said it's already merged. Currently there is a work on modernizing the codebase to be compatible with latest Django releases because there was no new release for a while. After that finishes there will be new version released which will not have these warnings.