          return queryset
  
      def __call__(self, value):
          queryset = self.queryset
          queryset = self.filter_queryset(value, queryset)
          queryset = self.exclude_current_instance(queryset)
          if qs_exists(queryset):
              raise ValidationError(self.message, code='unique')
  
      def __repr__(self):
          return '<%s(queryset=%s)>' % (
 
</s> remove     def __call__(self, value):
 </s> add     def __call__(self, value, serializer_field):
        # Determine the underlying model field name. This may not be the
        # same as the serializer field name if `source=<>` is set.
        field_name = serializer_field.source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        instance = getattr(serializer_field.parent, 'instance', None)
 </s> remove         queryset = self.filter_queryset(attrs, queryset)
        queryset = self.exclude_current_instance(attrs, queryset)
 </s> add         queryset = self.filter_queryset(attrs, queryset, field_name, date_field_name)
        queryset = self.exclude_current_instance(attrs, queryset, instance) </s> remove         if self.instance is not None:
            return queryset.exclude(pk=self.instance.pk)
 </s> add         if instance is not None:
            return queryset.exclude(pk=instance.pk) </s> remove     def __call__(self, attrs):
 </s> add     def __call__(self, attrs, serializer):
        # Determine the underlying model field names. These may not be the
        # same as the serializer field names if `source=<>` is set.
        field_name = serializer.fields[self.field].source_attrs[-1]
        date_field_name = serializer.fields[self.date_field].source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        instance = getattr(serializer, 'instance', None)
 </s> remove     def __call__(self):
        return self.user
 </s> add     def __call__(self, serializer_field):
        return serializer_field.context['request'].user
        queryset = self.filter_queryset(value, queryset, field_name)
        queryset = self.exclude_current_instance(queryset, instance)
          return queryset
  
      def __call__(self, value):
          queryset = self.queryset
        queryset = self.filter_queryset(value, queryset, field_name)
        queryset = self.exclude_current_instance(queryset, instance)
        queryset = self.filter_queryset(value, queryset, field_name)
        queryset = self.exclude_current_instance(queryset, instance)
          if qs_exists(queryset):
              raise ValidationError(self.message, code='unique')
  
      def __repr__(self):
          return '<%s(queryset=%s)>' % (
keep keep keep keep replace replace keep keep keep keep keep
 Drop `set_context()` (#7062)

* Do not persist the context in validators

Fixes encode/django-rest-framework#5760

* Drop set_context() in favour of 'requires_context = True' 
rest_framework/validators.py