          self.allow_blank = kwargs.pop('allow_blank', False)
          self.trim_whitespace = kwargs.pop('trim_whitespace', True)
          self.max_length = kwargs.pop('max_length', None)
          self.min_length = kwargs.pop('min_length', None)
          super(CharField, self).__init__(**kwargs)
          if self.max_length is not None:
              message = lazy(
                  self.error_messages['max_length'].format,
                  six.text_type)(max_length=self.max_length)
              self.validators.append(
 
</s> remove                 self.error_messages['max_length'].format,
                six.text_type)(max_length=self.max_length)
 </s> add                 self.error_messages['max_length'].format, str)(max_length=self.max_length) </s> remove         super(DurationField, self).__init__(**kwargs)
 </s> add         super().__init__(**kwargs) </s> remove         super(FileField, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs) </s> remove                 self.error_messages['min_value'].format,
                six.text_type)(min_value=self.min_value)
 </s> add                 self.error_messages['min_value'].format, str)(min_value=self.min_value) </s> remove         super(BaseSerializer, self).__init__(**kwargs)
 </s> add         super().__init__(**kwargs)
        super().__init__(**kwargs)
          self.allow_blank = kwargs.pop('allow_blank', False)
          self.trim_whitespace = kwargs.pop('trim_whitespace', True)
          self.max_length = kwargs.pop('max_length', None)
          self.min_length = kwargs.pop('min_length', None)
        super().__init__(**kwargs)
          if self.max_length is not None:
              message = lazy(
                  self.error_messages['max_length'].format,
                  six.text_type)(max_length=self.max_length)
              self.validators.append(
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
rest_framework/fields.py