1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #32365 -- Made zoneinfo the default timezone implementation.

Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick
Pope, and Paul Ganssle for reviews.
This commit is contained in:
Carlton Gibson
2021-09-09 15:15:44 +02:00
parent 7132d17de1
commit 306607d5b9
27 changed files with 635 additions and 280 deletions

View File

@@ -14,7 +14,10 @@ from pathlib import Path
from subprocess import CompletedProcess
from unittest import mock, skip, skipIf
import pytz
try:
import zoneinfo
except ImportError:
from backports import zoneinfo
import django.__main__
from django.apps.registry import Apps
@@ -247,7 +250,7 @@ class TestChildArguments(SimpleTestCase):
class TestUtilities(SimpleTestCase):
def test_is_django_module(self):
for module, expected in (
(pytz, False),
(zoneinfo, False),
(sys, False),
(autoreload, True)
):
@@ -256,7 +259,7 @@ class TestUtilities(SimpleTestCase):
def test_is_django_path(self):
for module, expected in (
(pytz.__file__, False),
(zoneinfo.__file__, False),
(contextlib.__file__, False),
(autoreload.__file__, True)
):