django-rest-knox
django-rest-knox copied to clipboard
ugettext_lazy is deprecated causing warnings
https://github.com/James1345/django-rest-knox/pull/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
Looks like this change made it in. Would love to see a release going out with this and #232
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"