From 4af7b4ed39113b4d5331ce5828eecaaeddff4b3d Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Fri, 6 Dec 2024 05:27:38 +0100 Subject: [PATCH] fix for https://github.com/Kozea/Radicale/issues/1516 --- radicale/httputils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/radicale/httputils.py b/radicale/httputils.py index 04898b40e..3983d7ebd 100644 --- a/radicale/httputils.py +++ b/radicale/httputils.py @@ -42,7 +42,10 @@ import importlib.abc from importlib import resources - _TRAVERSABLE_LIKE_TYPE = Union[importlib.abc.Traversable, pathlib.Path] + if sys.version_info < (3, 13): + _TRAVERSABLE_LIKE_TYPE = Union[importlib.abc.Traversable, pathlib.Path] + else: + _TRAVERSABLE_LIKE_TYPE = Union[importlib.resources.abc.Traversable, pathlib.Path] NOT_ALLOWED: types.WSGIResponse = ( client.FORBIDDEN, (("Content-Type", "text/plain"),),