          return ReturnDict(ret, serializer=self)
  
      @property
      def errors(self):
          ret = super(Serializer, self).errors
          if isinstance(ret, list) and len(ret) == 1 and getattr(ret[0], 'code', None) == 'null':
              # Edge case. Provide a more descriptive error than
              # "this field may not be null", when no data is passed.
              detail = ErrorDetail('No data provided', code='null')
              ret = {api_settings.NON_FIELD_ERRORS_KEY: [detail]}
 
</s> remove         ret = super(ListSerializer, self).errors
 </s> add         ret = super().errors </s> remove         ret = super(Serializer, self).data
 </s> add         ret = super().data </s> remove         ret = super(ListSerializer, self).data
 </s> add         ret = super().data </s> remove         if isinstance(ret, six.text_type):
 </s> add         if isinstance(ret, str): </s> remove         if isinstance(ret, six.text_type):
 </s> add         if isinstance(ret, str):
        ret = super().errors
          return ReturnDict(ret, serializer=self)
  
      @property
      def errors(self):
        ret = super().errors
          if isinstance(ret, list) and len(ret) == 1 and getattr(ret[0], 'code', None) == 'null':
              # Edge case. Provide a more descriptive error than
              # "this field may not be null", when no data is passed.
              detail = ErrorDetail('No data provided', code='null')
              ret = {api_settings.NON_FIELD_ERRORS_KEY: [detail]}
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/serializers.py