      ]
  
      def __init__(self, trailing_slash=True):
          self.trailing_slash = '/' if trailing_slash else ''
          super(SimpleRouter, self).__init__()
  
      def get_default_basename(self, viewset):
          """
          If `basename` is not specified, attempt to automatically determine
          it from the viewset.
 
</s> remove         if isinstance(ordering, six.string_types):
 </s> add         if isinstance(ordering, str): </s> remove         if data == '' or (self.trim_whitespace and six.text_type(data).strip() == ''):
 </s> add         if data == '' or (self.trim_whitespace and str(data).strip() == ''): </s> remove             data = urlparse.urlparse(data).path
 </s> add             data = parse.urlparse(data).path </s> remove class EndpointEnumerator(object):
 </s> add class EndpointEnumerator: </s> remove @python_2_unicode_compatible
class _MediaType(object):
 </s> add class _MediaType:
        super().__init__()
      ]
  
      def __init__(self, trailing_slash=True):
          self.trailing_slash = '/' if trailing_slash else ''
        super().__init__()
  
      def get_default_basename(self, viewset):
          """
          If `basename` is not specified, attempt to automatically determine
          it from the viewset.
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/routers.py