          List of dicts of native values <- List of dicts of primitive datatypes.
          """
          if html.is_html_input(data):
              data = html.parse_html_list(data, default=[])
          if isinstance(data, (six.text_type, Mapping)) or not hasattr(data, '__iter__'):
              self.fail('not_a_list', input_type=type(data).__name__)
          if not self.allow_empty and len(data) == 0:
              self.fail('empty')
          return self.run_child_validation(data)
  
 
</s> remove         if isinstance(data, six.text_type) or not hasattr(data, '__iter__'):
 </s> add         if isinstance(data, str) or not hasattr(data, '__iter__'): </s> remove         super(Serializer, self).run_validators(to_validate)
 </s> add         super().run_validators(to_validate) </s> remove         return super(APIRequestFactory, self).generic(
 </s> add         return super().generic( </s> remove         if isinstance(data, six.text_type) and len(data) > self.MAX_STRING_LENGTH:
 </s> add         if isinstance(data, str) and len(data) > self.MAX_STRING_LENGTH: </s> remove         if data == '' or (self.trim_whitespace and six.text_type(data).strip() == ''):
 </s> add         if data == '' or (self.trim_whitespace and str(data).strip() == ''):
        if isinstance(data, (str, Mapping)) or not hasattr(data, '__iter__'):
          List of dicts of native values <- List of dicts of primitive datatypes.
          """
          if html.is_html_input(data):
              data = html.parse_html_list(data, default=[])
        if isinstance(data, (str, Mapping)) or not hasattr(data, '__iter__'):
              self.fail('not_a_list', input_type=type(data).__name__)
          if not self.allow_empty and len(data) == 0:
              self.fail('empty')
          return self.run_child_validation(data)
  
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