                  # Use the default Django URL conf
                  urlconf = settings.ROOT_URLCONF
  
              # Load the given URLconf module
              if isinstance(urlconf, six.string_types):
                  urls = import_module(urlconf)
              else:
                  urls = urlconf
              patterns = urls.urlpatterns
  
 
</s> remove         urls = super(DefaultRouter, self).get_urls()
 </s> add         urls = super().get_urls() </s> remove             content_type = "{0}; charset={1}".format(
 </s> add             content_type = "{}; charset={}".format( </s> remove         if style.get('input_type') == 'datetime-local' and isinstance(field.value, six.text_type):
 </s> add         if style.get('input_type') == 'datetime-local' and isinstance(field.value, str): </s> remove         return super(SchemaView, self).handle_exception(exc)
 </s> add         return super().handle_exception(exc) </s> remove             if six.PY3:
                query_string = query_string.decode('iso-8859-1')
 </s> add             query_string = query_string.decode('iso-8859-1')
            if isinstance(urlconf, str):
                  # Use the default Django URL conf
                  urlconf = settings.ROOT_URLCONF
  
              # Load the given URLconf module
            if isinstance(urlconf, str):
                  urls = import_module(urlconf)
              else:
                  urls = urlconf
              patterns = urls.urlpatterns
  
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/schemas/generators.py