diff --git a/radicale/storage/__init__.py b/radicale/storage/__init__.py index 44f2e758..da89bcf3 100644 --- a/radicale/storage/__init__.py +++ b/radicale/storage/__init__.py @@ -2,6 +2,7 @@ # Copyright © 2014 Jean-Marc Martins # Copyright © 2012-2017 Guillaume Ayoub # Copyright © 2017-2022 Unrud +# Copyright © 2024-2024 Peter Bieringer # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,10 +33,10 @@ import vobject from radicale import config -from radicale.log import logger from radicale import item as radicale_item from radicale import types, utils from radicale.item import filter as radicale_filter +from radicale.log import logger INTERNAL_TYPES: Sequence[str] = ("multifilesystem", "multifilesystem_nolock",) diff --git a/radicale/utils.py b/radicale/utils.py index 1223d330..097be3fb 100644 --- a/radicale/utils.py +++ b/radicale/utils.py @@ -28,6 +28,7 @@ RADICALE_MODULES: Sequence[str] = ("radicale", "vobject", "passlib", "defusedxml") + def load_plugin(internal_types: Sequence[str], module_name: str, class_name: str, base_class: Type[_T_co], configuration: "config.Configuration") -> _T_co: @@ -51,12 +52,14 @@ def load_plugin(internal_types: Sequence[str], module_name: str, def package_version(name): return metadata.version(name) + def packages_version(): versions = [] for pkg in RADICALE_MODULES: versions.append("%s=%s" % (pkg, package_version(pkg))) return " ".join(versions) + def ssl_context_options_by_protocol(protocol: str, ssl_context_options): logger.debug("SSL protocol string: '%s' and current SSL context options: '0x%x'", protocol, ssl_context_options) # disable any protocol by default