          data = ['foo', 'bar', 'baz']
          serializer = self.BookSerializer(data=data, many=True)
          assert serializer.is_valid() is False
  
          text_type_string = six.text_type.__name__
          message = 'Invalid data. Expected a dictionary, but got %s.' % text_type_string
          expected_errors = [
              {'non_field_errors': [message]},
              {'non_field_errors': [message]},
              {'non_field_errors': [message]}
          ]
 
</s> remove                 'Invalid data. Expected a dictionary, but got %s.' % six.text_type.__name__
 </s> add                 'Invalid data. Expected a dictionary, but got str.', </s> remove     @unittest.skipUnless(ChainMap, 'requires python 3.3')
 </s> add  </s> remove         assert serializer.errors == {'target': ['Incorrect type. Expected pk value, received %s.' % six.text_type.__name__]}
 </s> add         assert serializer.errors == {'target': ['Incorrect type. Expected pk value, received str.']} </s> remove @six.add_metaclass(SerializerMetaclass)
class Serializer(BaseSerializer):
 </s> add class Serializer(BaseSerializer, metaclass=SerializerMetaclass): </s> remove         super(SchemaView, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs)
        message = 'Invalid data. Expected a dictionary, but got str.'
          data = ['foo', 'bar', 'baz']
          serializer = self.BookSerializer(data=data, many=True)
          assert serializer.is_valid() is False
  
        message = 'Invalid data. Expected a dictionary, but got str.'
        message = 'Invalid data. Expected a dictionary, but got str.'
          expected_errors = [
              {'non_field_errors': [message]},
              {'non_field_errors': [message]},
              {'non_field_errors': [message]}
          ]
keep keep keep keep replace 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> 
tests/test_serializer_bulk_update.py