                  # throw given an invalid datetime, so we need to specifically check.
                  if not valid_datetime(dt):
                      self.fail('make_aware', timezone=field_timezone)
                  return dt
              except InvalidTimeError:
                  self.fail('make_aware', timezone=field_timezone)
          elif (field_timezone is None) and timezone.is_aware(value):
              return timezone.make_naive(value, datetime.timezone.utc)
          return value
  
      def default_timezone(self):
 
</s> remove     class MockTimezone(pytz.BaseTzInfo):
        @staticmethod
        def localize(value, is_dst):
            raise pytz.InvalidTimeError()
 </s> add     if pytz:
        class MockTimezone(pytz.BaseTzInfo):
            @staticmethod
            def localize(value, is_dst):
                raise pytz.InvalidTimeError() </s> remove         def __str__(self):
            return 'America/New_York'
 </s> add             def __str__(self):
                return 'America/New_York' </s> remove     field = serializers.DateTimeField(default_timezone=MockTimezone())
 </s> add         field = serializers.DateTimeField(default_timezone=MockTimezone()) </s> remove     install_requires=["django>=3.0", "pytz", 'backports.zoneinfo;python_version<"3.9"'],
 </s> add     install_requires=["django>=3.0", 'backports.zoneinfo;python_version<"3.9"'], </s> remove import pytz
 </s> add try:
    import pytz
except ImportError:
    pytz = None

            except Exception as e:
                if pytz and isinstance(e, pytz.exceptions.InvalidTimeError):
                    self.fail('make_aware', timezone=field_timezone)
                raise e
                  # throw given an invalid datetime, so we need to specifically check.
                  if not valid_datetime(dt):
                      self.fail('make_aware', timezone=field_timezone)
                  return dt
            except Exception as e:
                if pytz and isinstance(e, pytz.exceptions.InvalidTimeError):
                    self.fail('make_aware', timezone=field_timezone)
                raise e
            except Exception as e:
                if pytz and isinstance(e, pytz.exceptions.InvalidTimeError):
                    self.fail('make_aware', timezone=field_timezone)
                raise e
          elif (field_timezone is None) and timezone.is_aware(value):
              return timezone.make_naive(value, datetime.timezone.utc)
          return value
  
      def default_timezone(self):
keep keep keep keep replace replace keep keep keep keep keep
 remove dependency on pytz (#8984)

* remove pytz

* Revert "remove pytz"

This reverts commit 393609dfaadbc4d82f760e6e4df8a6de6de24f9b.

* remove pytz, more subtly 
rest_framework/fields.py