jazzband / django-robots

A Django app for managing robots.txt files following the robots exclusion protocol
https://django-robots.readthedocs.io
BSD 3-Clause "New" or "Revised" License
459 stars 99 forks source link

Django deprecation warning #109

Closed GergelyKalmar closed 2 years ago

GergelyKalmar commented 3 years ago

When using django-robots under Django 3.1.7 I'm getting the following deprecation warning:

  File "/home/.../lib/python3.8/site-packages/robots/models.py", line 9, in <module>
    class Url(models.Model):
  File "/home/.../lib/python3.8/site-packages/robots/models.py", line 16, in Url
    _("pattern"),
  File "/home/.../lib/python3.8/site-packages/django/utils/translation/__init__.py", line 144, in ugettext_lazy
    warnings.warn(
django.utils.deprecation.RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().
GergelyKalmar commented 3 years ago

Hm, it seems this has been fixed in https://github.com/jazzband/django-robots/commit/fd73e50136a4a95313bddaf599de1d197fc40a9f and then simplified further in https://github.com/jazzband/django-robots/commit/eae597e951e0b05941fcf6d9c8dfb6bf1b7e13ac, however, they haven't been released yet. Could we get a new release which includes these (and all the other) patches from the last year? Thank you!