          'code': detail.code
      }
  
  
  class ErrorDetail(six.text_type):
      """
      A string-like object that can additionally have a code.
      """
      code = None
  
 
</s> remove class Hyperlink(six.text_type):
 </s> add class Hyperlink(str): </s> remove @python_2_unicode_compatible
 </s> add  </s> remove @python_2_unicode_compatible
 </s> add  </s> remove class override_method(object):
 </s> add class override_method: </s> remove         self = super(ErrorDetail, cls).__new__(cls, string)
 </s> add         self = super().__new__(cls, string)
class ErrorDetail(str):
          'code': detail.code
      }
  
  
class ErrorDetail(str):
      """
      A string-like object that can additionally have a code.
      """
      code = None
  
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/exceptions.py