                  "Cannot extract time component '%s' from DateField '%s'. " % (copy.lookup_name, field.name)
              )
          return copy
  
      @cached_property
      def output_field(self):
          return IntegerField()
  
  
  class ExtractYear(Extract):
      lookup_name = 'year'
  
  
 
</s> remove                 field.name, output_field.__class__.__name__ if explicit_output_field else 'DateTimeField'
 </s> add                 field.name, output_field.__class__.__name__ if has_explicit_output_field else 'DateTimeField' </s> remove                 field.name, output_field.__class__.__name__ if explicit_output_field else 'DateTimeField'
 </s> add                 field.name, output_field.__class__.__name__ if has_explicit_output_field else 'DateTimeField' </s> remove from django.utils.functional import cached_property
 </s> add  </s> remove     DateField, DateTimeField, DurationField, IntegerField, TimeField,
 </s> add     DateField, DateTimeField, DurationField, Field, IntegerField, TimeField, </s> remove 
    def __init__(self, y, x, filter=None):
        super().__init__(y=y, x=x, output_field=IntegerField(), filter=filter)
 </s> add     output_field = IntegerField()
                  "Cannot extract time component '%s' from DateField '%s'. " % (copy.lookup_name, field.name)
              )
          return copy
  




  
  class ExtractYear(Extract):
      lookup_name = 'year'
  
  
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fixed #28492 -- Defined default output_field of expressions at the class level.

This wasn't possible when settings were accessed during Field initialization
time as our test suite setup script was triggering imports of expressions
before settings were configured. 
django/db/models/functions/datetime.py