          assert serializer.errors == {}
  
  
  class Test4606Regression:
      def setup(self):
          class ExampleSerializer(serializers.Serializer):
              name = serializers.CharField(required=True)
              choices = serializers.CharField(required=True)
          self.Serializer = ExampleSerializer
 
</s> remove     @cached_property
 </s> add     @property </s> remove     @cached_property
 </s> add     @property </s> remove from django.utils.functional import cached_property
 </s> add 
class Test2505Regression:
    def test_serializer_context(self):
        class NestedSerializer(serializers.Serializer):
            def __init__(self, *args, **kwargs):
                super(NestedSerializer, self).__init__(*args, **kwargs)
                # .context should not cache
                self.context

        class ParentSerializer(serializers.Serializer):
            nested = NestedSerializer()

        serializer = ParentSerializer(data={}, context={'foo': 'bar'})
        assert serializer.context == {'foo': 'bar'}
        assert serializer.fields['nested'].context == {'foo': 'bar'}


          assert serializer.errors == {}
  
  
class Test2505Regression:
    def test_serializer_context(self):
        class NestedSerializer(serializers.Serializer):
            def __init__(self, *args, **kwargs):
                super(NestedSerializer, self).__init__(*args, **kwargs)
                # .context should not cache
                self.context

        class ParentSerializer(serializers.Serializer):
            nested = NestedSerializer()

        serializer = ParentSerializer(data={}, context={'foo': 'bar'})
        assert serializer.context == {'foo': 'bar'}
        assert serializer.fields['nested'].context == {'foo': 'bar'}


  class Test4606Regression:
      def setup(self):
          class ExampleSerializer(serializers.Serializer):
              name = serializers.CharField(required=True)
              choices = serializers.CharField(required=True)
          self.Serializer = ExampleSerializer
keep keep add keep keep keep keep keep keep
 Revert 3288 (#5313)

* Add regression test for #2505. Thanks @pySilver!

* Add regression test for #5087

* Revert "Cached the field's root and context property."

This reverts commit 792005806b50f8aad086a76ff5a742c66a98428e. 
tests/test_serializer.py