  from enum import auto
  from unittest.mock import patch
  
  import pytest
  import pytz
  from django.core.exceptions import ValidationError as DjangoValidationError
  from django.db.models import IntegerChoices, TextChoices
  from django.http import QueryDict
  from django.test import TestCase, override_settings
  from django.utils.timezone import activate, deactivate, override
 
</s> remove from pytz.exceptions import InvalidTimeError
 </s> add try:
    import pytz
except ImportError:
    pytz = None </s> remove             except InvalidTimeError:
                self.fail('make_aware', timezone=field_timezone)
 </s> add             except Exception as e:
                if pytz and isinstance(e, pytz.exceptions.InvalidTimeError):
                    self.fail('make_aware', timezone=field_timezone)
                raise e </s> remove     field = serializers.DateTimeField(default_timezone=MockTimezone())
 </s> add         field = serializers.DateTimeField(default_timezone=MockTimezone()) </s> remove         def __str__(self):
            return 'America/New_York'
 </s> add             def __str__(self):
                return 'America/New_York' </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()
try:
    import pytz
except ImportError:
    pytz = None

  from enum import auto
  from unittest.mock import patch
  
  import pytest
try:
    import pytz
except ImportError:
    pytz = None

  from django.core.exceptions import ValidationError as DjangoValidationError
  from django.db.models import IntegerChoices, TextChoices
  from django.http import QueryDict
  from django.test import TestCase, override_settings
  from django.utils.timezone import activate, deactivate, override
keep keep keep keep replace keep keep keep keep keep
 remove dependency on pytz (#8984)

* remove pytz

* Revert "remove pytz"

This reverts commit 393609dfaadbc4d82f760e6e4df8a6de6de24f9b.

* remove pytz, more subtly 
tests/test_fields.py