diff --git a/graphene_django/tests/models.py b/graphene_django/tests/models.py index 44a5d8a..0f9dfde 100644 --- a/graphene_django/tests/models.py +++ b/graphene_django/tests/models.py @@ -1,7 +1,7 @@ from __future__ import absolute_import from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ CHOICES = ((1, "this"), (2, _("that"))) diff --git a/graphene_django/tests/test_converter.py b/graphene_django/tests/test_converter.py index 7f84de3..f1d1b9b 100644 --- a/graphene_django/tests/test_converter.py +++ b/graphene_django/tests/test_converter.py @@ -1,7 +1,7 @@ import pytest from collections import namedtuple from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from graphene import NonNull from py.test import raises diff --git a/graphene_django/utils/utils.py b/graphene_django/utils/utils.py index f692dd5..3bee5aa 100644 --- a/graphene_django/utils/utils.py +++ b/graphene_django/utils/utils.py @@ -2,7 +2,7 @@ import inspect from django.db import models from django.db.models.manager import Manager -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.functional import Promise from graphene.utils.str_converters import to_camel_case @@ -25,7 +25,7 @@ def isiterable(value): def _camelize_django_str(s): if isinstance(s, Promise): - s = force_text(s) + s = force_str(s) return to_camel_case(s) if isinstance(s, str) else s