1- # Copyright The IETF Trust 2014-2019 , All Rights Reserved
1+ # Copyright The IETF Trust 2014-2020 , All Rights Reserved
22# -*- coding: utf-8 -*-
33
44
55from __future__ import absolute_import , print_function , unicode_literals
66
77import datetime
88import re
9- import six
109
11- from six . moves . urllib .parse import urlencode
10+ from urllib .parse import urlencode
1211
1312from django .conf import settings
1413from django .core .exceptions import ObjectDoesNotExist
@@ -82,7 +81,7 @@ def convert(self, value):
8281 if value is None :
8382 return None
8483
85- if isinstance (value , six . string_types ):
84+ if isinstance (value , str ):
8685 match = TIMEDELTA_REGEX .search (value )
8786
8887 if match :
@@ -97,7 +96,7 @@ def hydrate(self, bundle):
9796 value = super (TimedeltaField , self ).hydrate (bundle )
9897
9998 if value and not hasattr (value , 'seconds' ):
100- if isinstance (value , six . string_types ):
99+ if isinstance (value , str ):
101100 try :
102101 match = TIMEDELTA_REGEX .search (value )
103102
@@ -125,7 +124,7 @@ def dehydrate(self, bundle, for_list=True):
125124 if callable (self .attribute ):
126125 previous_obj = bundle .obj
127126 foreign_obj = self .attribute (bundle )
128- elif isinstance (self .attribute , six . string_types ):
127+ elif isinstance (self .attribute , str ):
129128 foreign_obj = bundle .obj
130129
131130 for attr in self ._attrs :
0 commit comments