From a5c8446ea48af93841ebba42b4856518ee7be96a Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Wed, 17 Dec 2025 17:20:05 +0100 Subject: [PATCH 1/2] Two minor bugfixes. Fixes https://github.com/python-caldav/caldav/pull/614 plus more --- caldav/lib/url.py | 2 +- caldav/search.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/caldav/lib/url.py b/caldav/lib/url.py index 9feff4ae..44728d1d 100644 --- a/caldav/lib/url.py +++ b/caldav/lib/url.py @@ -189,7 +189,7 @@ def join(self, path: Any) -> "URL": ): raise ValueError("%s can't be joined with %s" % (self, path)) - if path.path[0] == "/": + if path.path and path.path[0] == "/": ret_path = path.path else: sep = "/" diff --git a/caldav/search.py b/caldav/search.py index c8b4a942..e037790f 100644 --- a/caldav/search.py +++ b/caldav/search.py @@ -1,3 +1,4 @@ +import logging from copy import deepcopy from dataclasses import dataclass from dataclasses import field From 16713eabda9feddca1f1ff00956fb78c8c7e9303 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Sun, 18 Jan 2026 21:06:30 +0100 Subject: [PATCH 2/2] Export get_davclient from caldav package Add get_davclient to caldav/__init__.py exports so users can do: from caldav import get_davclient Ref: https://github.com/python-caldav/caldav/issues/612 Co-Authored-By: Claude Opus 4.5 --- caldav/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caldav/__init__.py b/caldav/__init__.py index 319a6eaa..433da774 100644 --- a/caldav/__init__.py +++ b/caldav/__init__.py @@ -11,6 +11,7 @@ "You need to install the `build` package and do a `python -m build` to get caldav.__version__ set correctly" ) from .davclient import DAVClient +from .davclient import get_davclient from .search import CalDAVSearcher ## TODO: this should go away in some future version of the library. @@ -29,4 +30,4 @@ def emit(self, record) -> None: log.addHandler(NullHandler()) -__all__ = ["__version__", "DAVClient"] +__all__ = ["__version__", "DAVClient", "get_davclient"]