From bc3fb30626e56f14b287bd8d920c011b3b8a79f1 Mon Sep 17 00:00:00 2001 From: Olivier Roux Date: Mon, 9 Dec 2019 12:01:43 +0100 Subject: [PATCH] Fix Django 4.0 deprecation warnings --- rest_framework_simplejwt/authentication.py | 2 +- rest_framework_simplejwt/backends.py | 2 +- rest_framework_simplejwt/exceptions.py | 2 +- rest_framework_simplejwt/serializers.py | 2 +- rest_framework_simplejwt/settings.py | 2 +- rest_framework_simplejwt/token_blacklist/admin.py | 2 +- rest_framework_simplejwt/token_blacklist/apps.py | 2 +- rest_framework_simplejwt/tokens.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rest_framework_simplejwt/authentication.py b/rest_framework_simplejwt/authentication.py index 8154c5180..f79e82f1b 100644 --- a/rest_framework_simplejwt/authentication.py +++ b/rest_framework_simplejwt/authentication.py @@ -1,4 +1,4 @@ -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework import HTTP_HEADER_ENCODING, authentication from .exceptions import AuthenticationFailed, InvalidToken, TokenError diff --git a/rest_framework_simplejwt/backends.py b/rest_framework_simplejwt/backends.py index efa83a429..b75886f55 100644 --- a/rest_framework_simplejwt/backends.py +++ b/rest_framework_simplejwt/backends.py @@ -1,5 +1,5 @@ import jwt -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from jwt import InvalidTokenError from .exceptions import TokenBackendError diff --git a/rest_framework_simplejwt/exceptions.py b/rest_framework_simplejwt/exceptions.py index 4a0633709..530d3a8e0 100644 --- a/rest_framework_simplejwt/exceptions.py +++ b/rest_framework_simplejwt/exceptions.py @@ -1,4 +1,4 @@ -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework import exceptions, status diff --git a/rest_framework_simplejwt/serializers.py b/rest_framework_simplejwt/serializers.py index af5eb501b..c3fa58cf5 100644 --- a/rest_framework_simplejwt/serializers.py +++ b/rest_framework_simplejwt/serializers.py @@ -1,5 +1,5 @@ from django.contrib.auth import authenticate -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework import exceptions, serializers from .settings import api_settings diff --git a/rest_framework_simplejwt/settings.py b/rest_framework_simplejwt/settings.py index 9f888d614..91a75024d 100644 --- a/rest_framework_simplejwt/settings.py +++ b/rest_framework_simplejwt/settings.py @@ -2,7 +2,7 @@ from django.conf import settings from django.test.signals import setting_changed -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework.settings import APISettings as _APISettings from .utils import format_lazy diff --git a/rest_framework_simplejwt/token_blacklist/admin.py b/rest_framework_simplejwt/token_blacklist/admin.py index c2d6db727..7aa4c2f59 100644 --- a/rest_framework_simplejwt/token_blacklist/admin.py +++ b/rest_framework_simplejwt/token_blacklist/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from .models import BlacklistedToken, OutstandingToken diff --git a/rest_framework_simplejwt/token_blacklist/apps.py b/rest_framework_simplejwt/token_blacklist/apps.py index e4169b7d2..24cde1ec7 100644 --- a/rest_framework_simplejwt/token_blacklist/apps.py +++ b/rest_framework_simplejwt/token_blacklist/apps.py @@ -1,5 +1,5 @@ from django.apps import AppConfig -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class TokenBlacklistConfig(AppConfig): diff --git a/rest_framework_simplejwt/tokens.py b/rest_framework_simplejwt/tokens.py index c80b4598c..8b9293f1b 100644 --- a/rest_framework_simplejwt/tokens.py +++ b/rest_framework_simplejwt/tokens.py @@ -2,7 +2,7 @@ from uuid import uuid4 from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from .exceptions import TokenBackendError, TokenError from .settings import api_settings