diff --git a/radicale/item/__init__.py b/radicale/item/__init__.py index 3bce12a..04362b7 100644 --- a/radicale/item/__init__.py +++ b/radicale/item/__init__.py @@ -28,7 +28,6 @@ import contextlib import math import os import re -import sys from datetime import datetime, timedelta from hashlib import sha256 from itertools import chain @@ -327,13 +326,7 @@ def find_time_range(vobject_item: vobject.base.Component, tag: str start = radicale_filter.DATETIME_MIN if end is None: end = radicale_filter.DATETIME_MAX - try: - return math.floor(start.timestamp()), math.ceil(end.timestamp()) - except ValueError as e: - if str(e) == ("offset must be a timedelta representing a whole " - "number of minutes") and sys.version_info < (3, 6): - raise RuntimeError("Unsupported in Python < 3.6: %s" % e) from e - raise + return math.floor(start.timestamp()), math.ceil(end.timestamp()) class Item: diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index f654f1c..c025493 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -22,11 +22,9 @@ Radicale tests with simple requests. import os import posixpath -import sys from typing import Any, Callable, ClassVar, Iterable, List, Optional, Tuple import defusedxml.ElementTree as DefusedET -import pytest from radicale import storage, xmlutils from radicale.tests import RESPONSES, BaseTest @@ -1654,8 +1652,6 @@ permissions: RrWw""") _, headers, _ = self.request("GET", "/.well-known/foo", check=404) assert headers.get("test") == "123" - @pytest.mark.skipif(sys.version_info < (3, 6), - reason="Unsupported in Python < 3.6") def test_timezone_seconds(self) -> None: """Verify that timezones with minutes and seconds work.""" self.mkcalendar("/calendar.ics/")