asyncee / django-easy-select2

Select2 input widget for django selectable fields.
http://django-easy-select2.readthedocs.io/en/latest/
MIT License
214 stars 28 forks source link

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

Closed mikekeda closed 2 years ago

mikekeda commented 2 years ago

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

gauravv7 commented 2 years ago

Confirmed, will submit this change by eod today

mikekeda commented 2 years ago

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

asyncee commented 2 years ago

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

Thanks!

asyncee commented 2 years ago

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 .

asyncee commented 2 years ago

Version 1.5.8 released, thank you for your contribution!

hartwork commented 2 years ago

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

mikekeda commented 2 years ago

thanks

hartwork commented 2 years ago

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

asyncee commented 2 years ago

@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!

hartwork commented 2 years ago

@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.

asyncee commented 2 years ago

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

hartwork commented 2 years ago

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

asyncee commented 2 years ago

Invited you.

hartwork commented 2 years ago

@asyncee thank you! :pray:

hartwork commented 2 years ago

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