          # have it's value set based on the existing instance attribute.
          if self.instance is not None:
              for field_name in self.fields:
                  if field_name not in attrs:
                      attrs[field_name] = getattr(self.instance, field_name)
  
          # Determine the filter keyword arguments and filter the queryset.
          filter_kwargs = {
              field_name: attrs[field_name]
              for field_name in self.fields
 
</s> remove         if self.instance is not None:
 </s> add         if instance is not None: </s> remove         if self.instance is not None:
 </s> add         if instance is not None: </s> remove     def filter_queryset(self, attrs, queryset):
 </s> add     def filter_queryset(self, attrs, queryset, instance): </s> remove     def exclude_current_instance(self, attrs, queryset):
 </s> add     def exclude_current_instance(self, attrs, queryset, instance): </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)

                    attrs[field_name] = getattr(instance, field_name)
          # have it's value set based on the existing instance attribute.
          if self.instance is not None:
              for field_name in self.fields:
                  if field_name not in attrs:
                    attrs[field_name] = getattr(instance, field_name)
  
          # Determine the filter keyword arguments and filter the queryset.
          filter_kwargs = {
              field_name: attrs[field_name]
              for field_name in self.fields
keep keep keep keep 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