          """
          filter_queryset should add value from existing instance attribute
          if it is not provided in attributes dict
          """
          class MockQueryset(object):
              def filter(self, **kwargs):
                  self.called_with = kwargs
  
          data = {'race_name': 'bar'}
          queryset = MockQueryset()
 
</s> remove         instance = super(Field, cls).__new__(cls)
 </s> add         instance = super().__new__(cls) </s> remove         return super(URLPathVersioning, self).reverse(
 </s> add         return super().reverse( </s> remove         super(HyperlinkedRelatedField, self).__init__(**kwargs)
 </s> add         super().__init__(**kwargs) </s> remove         class MockQuerySet(object):
 </s> add         class MockQuerySet: </s> remove class BaseParser(object):
 </s> add class BaseParser:
        class MockQueryset:
          """
          filter_queryset should add value from existing instance attribute
          if it is not provided in attributes dict
          """
        class MockQueryset:
              def filter(self, **kwargs):
                  self.called_with = kwargs
  
          data = {'race_name': 'bar'}
          queryset = MockQueryset()
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> 
tests/test_validators.py