Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ugettext_lazy is deprecated causing warnings #216

Open
AlecRichardson opened this issue Jul 9, 2020 · 2 comments
Open

ugettext_lazy is deprecated causing warnings #216

AlecRichardson opened this issue Jul 9, 2020 · 2 comments

Comments

@AlecRichardson
Copy link

AlecRichardson commented Jul 9, 2020

#214

https://github.com/James1345/django-rest-knox/blob/develop/knox/auth.py#L10

  /usr/local/lib/python3.8/site-packages/knox/auth.py:63: RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().
    msg = _('Invalid token.')

Docs: https://docs.pytest.org/en/latest/warnings.html

@sdebnath
Copy link

Looks like this change made it in. Would love to see a release going out with this and #232

@mamtach
Copy link

mamtach commented Dec 26, 2021

After upgrading python 3.8.1 to version 3.8.10, I am seeing following error

\lib\site-packages\knox\auth.py", line 11, in <module>
    from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'

Pipfile:

django = ">=4.0"
djangorestframework = "~=3.13.1"
django-rest-knox = ">=4.1.0"
django-imagekit = ">=4.1.0"

[requires]
python_version = "3.8.10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants