diff --git a/news/141.internal.md b/news/141.internal.md new file mode 100644 index 0000000..7a7e538 --- /dev/null +++ b/news/141.internal.md @@ -0,0 +1,2 @@ +Remove pytz as test dependency. +[thet] diff --git a/setup.py b/setup.py index ad75bfc..d261055 100644 --- a/setup.py +++ b/setup.py @@ -72,7 +72,6 @@ "plone.app.textfield", "plone.behavior", "plone.testing", - "pytz", "transaction", ] }, diff --git a/src/plone/app/caching/tests/test_utils.py b/src/plone/app/caching/tests/test_utils.py index a362125..d900ecd 100644 --- a/src/plone/app/caching/tests/test_utils.py +++ b/src/plone/app/caching/tests/test_utils.py @@ -12,12 +12,12 @@ from plone.testing.zca import UNIT_TESTING from Products.CMFCore.interfaces import IDynamicType from Products.CMFDynamicViewFTI.interfaces import IBrowserDefault +from zoneinfo import ZoneInfo from zope.component import getUtility from zope.component import provideAdapter from zope.component import provideUtility from zope.interface import implementer -import pytz import unittest TEST_TIMEZONE = "Europe/Vienna" @@ -31,9 +31,8 @@ def stable_now(): several tests compare this date with an Expires header, and this header may be set to ten years ago. """ - tzinfo = pytz.timezone(TEST_TIMEZONE) - now = datetime.now() - timedelta(days=1000) - now = tzinfo.localize(now) # set tzinfo with correct DST offset + tzinfo = ZoneInfo(TEST_TIMEZONE) + now = datetime.now(tzinfo) - timedelta(days=1000) return now