          """
          errors = []
          for validator in self.validators:
              if hasattr(validator, 'set_context'):
                  validator.set_context(self)
  
              try:
                  if getattr(validator, 'requires_context', False):
 
</s> remove                 validator(value)
 </s> add                 if getattr(validator, 'requires_context', False):
                    validator(value, self)
                else:
                    validator(value) </s> remove             return self.default()
 </s> add             if getattr(self.default, 'requires_context', False):
                return self.default(self)
            else:
                return self.default()
 </s> remove             return self.default()
 </s> add             if hasattr(self.default, 'set_context'):
                warnings.warn(
                    "Method `set_context` on defaults is deprecated and will "
                    "no longer be called starting with 3.12. Instead set "
                    "`requires_context = True` on the class, and accept the "
                    "context as an additional argument.",
                    DeprecationWarning, stacklevel=2
                )
                self.default.set_context(self)

            if getattr(self.default, 'requires_context', False):
                return self.default(serializer_field)
            else:
                return self.default() </s> remove                     attrs[field_name] = getattr(self.instance, field_name)
 </s> add                     attrs[field_name] = getattr(instance, field_name)
                warnings.warn(
                    "Method `set_context` on validators is deprecated and will "
                    "no longer be called starting with 3.12. Instead set "
                    "`requires_context = True` on the class, and accept the "
                    "context as an additional argument.",
                    DeprecationWarning, stacklevel=2
                )
          """
          errors = []
          for validator in self.validators:
              if hasattr(validator, 'set_context'):
                warnings.warn(
                    "Method `set_context` on validators is deprecated and will "
                    "no longer be called starting with 3.12. Instead set "
                    "`requires_context = True` on the class, and accept the "
                    "context as an additional argument.",
                    DeprecationWarning, stacklevel=2
                )
                  validator.set_context(self)
  
              try:
                  if getattr(validator, 'requires_context', False):
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/fields.py