      Should be applied to the serializer class, not to an individual field.
      """
      message = _('The fields {field_names} must make a unique set.')
      missing_message = _('This field is required.')
  
      def __init__(self, queryset, fields, message=None):
          self.queryset = queryset
          self.fields = fields
 
</s> remove     def set_context(self, serializer):
        """
        This hook is called by the serializer instance,
        prior to the validation call being made.
        """
        # Determine the existing instance, if this is an update operation.
        self.instance = getattr(serializer, 'instance', None)

    def enforce_required_fields(self, attrs):
 </s> add     def enforce_required_fields(self, attrs, instance): </s> remove     def filter_queryset(self, attrs, queryset):
 </s> add     def filter_queryset(self, attrs, queryset, field_name, date_field_name): </s> remove     def filter_queryset(self, attrs, queryset):
 </s> add     def filter_queryset(self, attrs, queryset, field_name, date_field_name): </s> remove     def filter_queryset(self, attrs, queryset):
 </s> add     def filter_queryset(self, attrs, queryset, field_name, date_field_name):
    requires_context = True
      Should be applied to the serializer class, not to an individual field.
      """
      message = _('The fields {field_names} must make a unique set.')
      missing_message = _('This field is required.')
    requires_context = True
  
      def __init__(self, queryset, fields, message=None):
          self.queryset = queryset
          self.fields = fields
keep keep keep add 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