From cd464fbc3ab5c3eccd9d026607341bfe859f10aa Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 14 Apr 2023 06:10:31 +0200 Subject: [PATCH] [4.2.x] Refs #34483 -- Fixed utils_tests.test_timesince crash on Python 3.8. --- tests/utils_tests/test_timesince.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/utils_tests/test_timesince.py b/tests/utils_tests/test_timesince.py index d54fce2be6..da6438eaaa 100644 --- a/tests/utils_tests/test_timesince.py +++ b/tests/utils_tests/test_timesince.py @@ -1,5 +1,9 @@ import datetime -import zoneinfo + +try: + import zoneinfo +except ImportError: + from backports import zoneinfo from django.test import TestCase from django.test.utils import override_settings, requires_tz_support