File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 10
10
from django .utils import six
11
11
from django .views .generic import View
12
12
13
+ try :
14
+ # Python 3 (required for 3.8+)
15
+ from collections .abc import Mapping # noqa
16
+ except ImportError :
17
+ # Python 2.7
18
+ from collections import Mapping # noqa
19
+
13
20
try :
14
21
from django .urls import ( # noqa
15
22
URLPattern ,
Original file line number Diff line number Diff line change 15
15
import copy
16
16
import inspect
17
17
import traceback
18
- from collections import Mapping , OrderedDict
18
+ from collections import OrderedDict
19
19
20
20
from django .core .exceptions import ImproperlyConfigured
21
21
from django .core .exceptions import ValidationError as DjangoValidationError
27
27
from django .utils .functional import cached_property
28
28
from django .utils .translation import ugettext_lazy as _
29
29
30
- from rest_framework .compat import postgres_fields , unicode_to_repr
30
+ from rest_framework .compat import Mapping , postgres_fields , unicode_to_repr
31
31
from rest_framework .exceptions import ErrorDetail , ValidationError
32
32
from rest_framework .fields import get_error_detail , set_value
33
33
from rest_framework .settings import api_settings
You can’t perform that action at this time.
0 commit comments