django-easy-select2: Django 4.0 ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'

I upgraded Django to 4.0 and I’m getting an error:

  File "easy_select2/__init__.py", line 1, in <module>
    from easy_select2.utils import select2_modelform_meta, select2_modelform, \
  File "easy_select2/utils.py", line 5, in <module>
    from easy_select2 import forms as es2_forms
  File "easy_select2/forms.py", line 5, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (django/utils/translation/__init__.py)

We need to change ugettext_lazy to gettext_lazy

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (8 by maintainers)

Most upvoted comments

@mikekeda i’m sorry for delay, new version will be released later today.

Thanks!

@asyncee I’m “sping” over there: https://pypi.org/user/sping/

Version 1.5.8 released, thank you for your contribution!