Skip to content

Commit d740bae

Browse files
Ryan P KilbyCarlton Gibson
authored andcommitted
Update json imports
1 parent b64f806 commit d740bae

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

rest_framework/fields.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import datetime
66
import decimal
77
import inspect
8-
import json
98
import re
109
import uuid
1110
from collections import OrderedDict
@@ -37,7 +36,7 @@
3736
)
3837
from rest_framework.exceptions import ErrorDetail, ValidationError
3938
from rest_framework.settings import api_settings
40-
from rest_framework.utils import html, humanize_datetime, representation
39+
from rest_framework.utils import html, humanize_datetime, json, representation
4140

4241

4342
class empty:

rest_framework/parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from __future__ import unicode_literals
88

99
import codecs
10-
import json
1110

1211
from django.conf import settings
1312
from django.core.files.uploadhandler import StopFutureHandlers
@@ -23,6 +22,7 @@
2322

2423
from rest_framework import renderers
2524
from rest_framework.exceptions import ParseError
25+
from rest_framework.utils import json
2626

2727

2828
class DataAndFiles(object):

rest_framework/renderers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from __future__ import unicode_literals
1010

1111
import base64
12-
import json
1312
from collections import OrderedDict
1413

1514
from django import forms
@@ -30,7 +29,7 @@
3029
from rest_framework.exceptions import ParseError
3130
from rest_framework.request import is_form_media_type, override_method
3231
from rest_framework.settings import api_settings
33-
from rest_framework.utils import encoders
32+
from rest_framework.utils import encoders, json
3433
from rest_framework.utils.breadcrumbs import get_breadcrumbs
3534
from rest_framework.utils.field_mapping import ClassLookupDict
3635

rest_framework/utils/serializer_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from __future__ import unicode_literals
22

33
import collections
4-
import json
54
from collections import OrderedDict
65

76
from django.utils.encoding import force_text
87

98
from rest_framework.compat import unicode_to_repr
9+
from rest_framework.utils import json
1010

1111

1212
class ReturnDict(OrderedDict):

tests/test_renderers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import unicode_literals
33

4-
import json
54
import re
65
from collections import MutableMapping, OrderedDict
76

@@ -24,6 +23,7 @@
2423
from rest_framework.response import Response
2524
from rest_framework.settings import api_settings
2625
from rest_framework.test import APIRequestFactory
26+
from rest_framework.utils import json
2727
from rest_framework.views import APIView
2828

2929
DUMMYSTATUS = status.HTTP_200_OK

tests/test_routers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import unicode_literals
22

3-
import json
43
from collections import namedtuple
54

65
import pytest
@@ -15,6 +14,7 @@
1514
from rest_framework.response import Response
1615
from rest_framework.routers import DefaultRouter, SimpleRouter
1716
from rest_framework.test import APIRequestFactory
17+
from rest_framework.utils import json
1818

1919
factory = APIRequestFactory()
2020

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy