diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index 3e95d8f..21dcd11 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -32,12 +32,12 @@ import logging import posixpath import pprint import random +import sys import time import xml.etree.ElementTree as ET import zlib from http import client -import defusedxml.ElementTree as DefusedET import pkg_resources from radicale import (auth, httputils, log, pathutils, rights, storage, web, @@ -56,6 +56,10 @@ from radicale.app.put import ApplicationPutMixin from radicale.app.report import ApplicationReportMixin from radicale.log import logger +# WORKAROUND: https://github.com/tiran/defusedxml/issues/54 +import defusedxml.ElementTree as DefusedET # isort: skip +sys.modules["xml.etree"].ElementTree = ET + VERSION = pkg_resources.get_distribution("radicale").version