              'when setting read_only=`True`.'
          )
          kwargs.pop('many', None)
          kwargs.pop('allow_empty', None)
          super(RelatedField, self).__init__(**kwargs)
  
      def __new__(cls, *args, **kwargs):
          # We override this method in order to automagically create
          # `ManyRelatedField` classes instead when `many=True` is set.
          if kwargs.pop('many', False):
 
</s> remove         super(BaseSerializer, self).__init__(**kwargs)
 </s> add         super().__init__(**kwargs) </s> remove         return super(RelatedField, cls).__new__(cls, *args, **kwargs)
 </s> add         return super().__new__(cls, *args, **kwargs) </s> remove         return super(BaseSerializer, cls).__new__(cls, *args, **kwargs)
 </s> add         return super().__new__(cls, *args, **kwargs) </s> remove         super(DictField, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs) </s> remove         super(ManyRelatedField, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs)
        super().__init__(**kwargs)
              'when setting read_only=`True`.'
          )
          kwargs.pop('many', None)
          kwargs.pop('allow_empty', None)
        super().__init__(**kwargs)
  
      def __new__(cls, *args, **kwargs):
          # We override this method in order to automagically create
          # `ManyRelatedField` classes instead when `many=True` is set.
          if kwargs.pop('many', False):
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/relations.py