          return request.build_absolute_uri(url)
      return url
  
  
  reverse_lazy = lazy(reverse, six.text_type)
 
</s> remove         url = super(QueryParameterVersioning, self).reverse(
 </s> add         url = super().reverse( </s> remove         if isinstance(data, six.text_type) or not hasattr(data, '__iter__'):
 </s> add         if isinstance(data, str) or not hasattr(data, '__iter__'): </s> remove @python_2_unicode_compatible
 </s> add  </s> remove         if isinstance(data, six.text_type) and len(data) > self.MAX_STRING_LENGTH:
 </s> add         if isinstance(data, str) and len(data) > self.MAX_STRING_LENGTH: </s> remove         assert isinstance(self.pagination.to_html(), six.text_type)
 </s> add         assert isinstance(self.pagination.to_html(), str)
reverse_lazy = lazy(reverse, str)
          return request.build_absolute_uri(url)
      return url
  
  
reverse_lazy = lazy(reverse, str)
keep keep keep keep replace
 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/reverse.py