                  default_field = IntegerField(required=False)
                  descriptive_field = IntegerField(help_text='Some help text', label='A label')
                  choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')))
          """)
          if six.PY2:
              # This particular case is too awkward to resolve fully across
              # both py2 and py3.
              expected = expected.replace(
                  "('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')",
                  "(u'red', u'Red'), (u'blue', u'Blue'), (u'green', u'Green')"
              )
          self.assertEqual(unicode_repr(TestSerializer()), expected)
  
      # merge this into test_regular_fields / RegularFieldsModel when
      # Django 2.1 is the minimum supported version
      @pytest.mark.skipif(django.VERSION < (2, 1), reason='Django version < 2.1')
      def test_nullable_boolean_field(self):
 
</s> remove         if six.PY2:
            # This case is also too awkward to resolve fully across both py2
            # and py3.  (See above)
            expected = expected.replace(
                "('foreign_key', 'one_to_one')",
                "(u'foreign_key', u'one_to_one')"
            )
        self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected) </s> remove def unicode_repr(instance):
    # Get the repr of an instance, but ensure it is a unicode string
    # on both python 3 (already the case) and 2 (not the case).
    if six.PY2:
        return repr(instance).decode('utf-8')
    return repr(instance)


def unicode_to_repr(value):
    # Coerce a unicode string to the correct repr return type, depending on
    # the Python version. We wrap all our `__repr__` implementations with
    # this and then use unicode throughout internally.
    if six.PY2:
        return value.encode('utf-8')
    return value


 </s> add  </s> remove         super(ForceAuthClientHandler, self).__init__(*args, **kwargs)
 </s> add         super().__init__(*args, **kwargs) </s> remove         self.assertEqual(unicode_repr(TestSerializer()), expected)
 </s> add         self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
                  default_field = IntegerField(required=False)
                  descriptive_field = IntegerField(help_text='Some help text', label='A label')
                  choices_field = ChoiceField(choices=(('red', 'Red'), ('blue', 'Blue'), ('green', 'Green')))
          """)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
        self.assertEqual(repr(TestSerializer()), expected)
  
      # merge this into test_regular_fields / RegularFieldsModel when
      # Django 2.1 is the minimum supported version
      @pytest.mark.skipif(django.VERSION < (2, 1), reason='Django version < 2.1')
      def test_nullable_boolean_field(self):
keep keep keep keep replace replace replace replace replace replace replace 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_model_serializer.py