          models.FileField: FileField,
          models.FloatField: FloatField,
          models.ImageField: ImageField,
          models.IntegerField: IntegerField,
          models.NullBooleanField: NullBooleanField,
          models.PositiveIntegerField: IntegerField,
          models.PositiveSmallIntegerField: IntegerField,
          models.SlugField: SlugField,
          models.SmallIntegerField: IntegerField,
          models.TextField: CharField,
 
</s> remove                 null_boolean_field = NullBooleanField(required=False)
 </s> add                 null_boolean_field = BooleanField(allow_null=True, required=False) </s> remove     if model_field.null and not isinstance(model_field, models.NullBooleanField):
 </s> add     if model_field.null: </s> remove     def to_internal_value(self, data):
        try:
            if data in self.TRUE_VALUES:
                return True
            elif data in self.FALSE_VALUES:
                return False
            elif data in self.NULL_VALUES:
                return None
        except TypeError:  # Input is an unhashable type
            pass
        self.fail('invalid', input=data)

    def to_representation(self, value):
        if value in self.NULL_VALUES:
            return None
        if value in self.TRUE_VALUES:
            return True
        elif value in self.FALSE_VALUES:
            return False
        return bool(value)
 </s> add         super().__init__(**kwargs) </s> remove         super().__init__(**kwargs)
 </s> add 
        models.NullBooleanField: BooleanField,
          models.FileField: FileField,
          models.FloatField: FloatField,
          models.ImageField: ImageField,
          models.IntegerField: IntegerField,
        models.NullBooleanField: BooleanField,
          models.PositiveIntegerField: IntegerField,
          models.PositiveSmallIntegerField: IntegerField,
          models.SlugField: SlugField,
          models.SmallIntegerField: IntegerField,
          models.TextField: CharField,
keep keep keep keep replace keep keep keep keep keep
 Merge NullBooleanField with BooleanField(allow_null=True) (#7122)

* Make `NullBooleanField` subclass `BooleanField`

This removes a lot of the redundancy that was in place becuase we
were not doing this. This maintains the `None` initial value that
was previously present, as well as disallowing `allow_null` to be
passed in.

* Remove special case for mapping `NullBooleanField`

In newer versions of Django, the `NullBooleanField` is handled the
same way as a `BooleanField(null=True)`. Given that we also support
that combination, and that our own `NullBooleanField` behaves in the
same manner, it makes sense to remove the special casing that exists
for it.

* Add test for BooleanField(null=True, choices)

* Remove special case for NullBooleanField

* Adjust mapping tests for NullBooleanField

* Fixed linting error

* Raise deprecation warning when NullBooleanField is used

* Fix linting issue in imports 
rest_framework/serializers.py