asyncee/django-easy-select2

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

mikekeda opened this issue ยท 15 comments

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

Confirmed, will submit this change by eod today

I'm waiting for the new version on pypi to close this

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

Thanks!

I'm very sorry about delay, still can't get to my PC. This is very seldom situation, but I'm keeping the issue in my todo list, so the release will be ASAP by me or @gauravv7 .

Version 1.5.8 released, thank you for your contribution!

@asyncee cool! Pushing a Git tag and a new release entry at https://github.com/asyncee/django-easy-select2/releases would make it perfect ๐Ÿ˜„

thanks

PS: @asyncee let me know if you want me to take over, happy either way. Note to self: commit is 8b5fc17 .

@hartwork i'm sorry for delay, it is still in my todo list. Currently the library is not my priority because i'm very busy on my work and not using django for years. I can make you collaborator on pypi if you wish. Thank you for your help!

@asyncee all good, I didn't mean to stress, I just wanted to be sure things go complete one way or another. I gladly accept the invitation to PyPI.

Great, thank you! Are your nickname the same on pypi?

@asyncee I'm "sping" over there: https://pypi.org/user/sping/

Invited you.

@asyncee thank you! ๐Ÿ™

I have pushed a Git tag and a release page at https://github.com/asyncee/django-easy-select2/releases now, so there is no chance we forget about it. In the process I noticed the change log is missing some things. I'll make a pull request for that in a minute.

CC @asyncee