shinneider / django-admin-inline-paginator

MIT License
128 stars 21 forks source link

Replace deprecated `ugettext` with `gettext` #15

Closed aitorres closed 2 years ago

aitorres commented 2 years ago

What I did

When using this package locally with certain versions of Django, a deprecation warning comes up:

RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().

The use of ugettext_lazy was deprecated in Django 3.0 and will be removed in 4.0, which is soon to be released.

All currently supported Django versions (2.2 LTS and above) support gettext_lazy, so this should not be a breaking change.

How to test

All tests should pass! No change in the package's behavior is expected.

pembo13 commented 2 years ago

@aitorres thanks for this.

aitorres commented 2 years ago

@aitorres thanks for this.

You're welcome! :-)

Also, just noting that Django 4.0 was already released. Until these changes are merged to master, this package will be broken for that (supported) Django version because of the removal of ugettext_lazy.

shinneider commented 2 years ago

@aitorres, @pembo13 fix accepted, please update to version 0.3.0

pembo13 commented 2 years ago

@shinneider thank you.