      Wrapping prevents calling code conflating this with unrelated errors.
      """
  
  
  class Hyperlink(six.text_type):
      """
      A string like object that additionally has an associated name.
      We use this for hyperlinked URLs that may render as a named link
      in some contexts, or render as a plain URL in others.
      """
 
</s> remove         ret = six.text_type.__new__(self, url)
 </s> add         ret = str.__new__(self, url) </s> remove class ErrorDetail(six.text_type):
 </s> add class ErrorDetail(str): </s> remove         @python_2_unicode_compatible
        class MockLazyStr(object):
 </s> add         class MockLazyStr: </s> remove class Empty(object):
 </s> add class Empty: </s> remove class BadType(object):
 </s> add class BadType:
class Hyperlink(str):
      Wrapping prevents calling code conflating this with unrelated errors.
      """
  
  
class Hyperlink(str):
      """
      A string like object that additionally has an associated name.
      We use this for hyperlinked URLs that may render as a named link
      in some contexts, or render as a plain URL in others.
      """
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