Skip to content

Commit 549dde1

Browse files
committed
Resolve RemovedInDjango40Warning warnings
* gql/graphene-django/graphene_django/tests/test_converter.py:175: RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy(). * graphene-django/graphene_django/utils/utils.py:28: RemovedInDjango40Warning: force_text() is deprecated in favor of force_str().
1 parent 14d0414 commit 549dde1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

graphene_django/tests/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import absolute_import
22

33
from django.db import models
4-
from django.utils.translation import ugettext_lazy as _
4+
from django.utils.translation import gettext_lazy as _
55

66
CHOICES = ((1, "this"), (2, _("that")))
77

graphene_django/tests/test_converter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
from collections import namedtuple
33
from django.db import models
4-
from django.utils.translation import ugettext_lazy as _
4+
from django.utils.translation import gettext_lazy as _
55
from graphene import NonNull
66
from py.test import raises
77

graphene_django/utils/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from django.db import models
44
from django.db.models.manager import Manager
5-
from django.utils.encoding import force_text
5+
from django.utils.encoding import force_str
66
from django.utils.functional import Promise
77

88
from graphene.utils.str_converters import to_camel_case
@@ -25,7 +25,7 @@ def isiterable(value):
2525

2626
def _camelize_django_str(s):
2727
if isinstance(s, Promise):
28-
s = force_text(s)
28+
s = force_str(s)
2929
return to_camel_case(s) if isinstance(s, str) else s
3030

3131

0 commit comments

Comments
 (0)