          ret.versioning_scheme = request.versioning_scheme
      return ret
  
  
  class ForcedAuthentication(object):
      """
      This authentication class is used if the test client or request factory
      forcibly authenticated the request.
      """
  
 
</s> remove     if isinstance(auth, text_type):
 </s> add     if isinstance(auth, str): </s> remove         request = super(ViewSetMixin, self).initialize_request(request, *args, **kwargs)
 </s> add         request = super().initialize_request(request, *args, **kwargs) </s> remove @python_2_unicode_compatible
class PKOnlyObject(object):
 </s> add class PKOnlyObject: </s> remove         class AuthRaisesAttributeError(object):
 </s> add         class AuthRaisesAttributeError: </s> remove     html = six.text_type(value)
 </s> add     html = str(value)
class ForcedAuthentication:
          ret.versioning_scheme = request.versioning_scheme
      return ret
  
  
class ForcedAuthentication:
      """
      This authentication class is used if the test client or request factory
      forcibly authenticated the request.
      """
  
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/request.py