Skip to content

Small fixes: propfind values, password type, DAVError.status, UID conflicts - #807

Merged
tobixen merged 6 commits into
masterfrom
small-fixes-799-805-806-795
Oct 20, 2026
Merged

tobixen merged 6 commits into
masterfrom
small-fixes-799-805-806-795

Conversation

@tobixen

@tobixen tobixen commented Oct 20, 2026

Copy link
Copy Markdown
Member

Disclaimer: AI-generated code and text below the line, generated by Claude Opus 5.5, from the prompt:

Fix 782, 799, 598, 795, 805, 806. The small ones can share one PR, the bigger ones should probably have separated PRs. (...)


The small issues from that list, one commit each:

Also piggy-backing two TODO entries in docs/design/TODO.md: config errors from extract_conn_params_from_section naming no section, and calendar_multiget() failing on an async client (found in the review of this PR).

Fixes #795
Fixes #799
Fixes #805
Fixes #806

🤖 Generated with Claude Code

Config errors raised through extract_conn_params_from_section name the
section "section"; note the fix for later.

Prompt: [fix issues found during the review process of plann's switch to caldav 3.6; this one filed for later]

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
propfind() gave the raw lxml element for supported-report-set and
current-user-privilege-set, as _element_to_value() only flattens one
level of nesting.  Both are now lists of the report and privilege names.
Properties still too complex to flatten (e.g. DAV:acl) keep the element,
which the docstring now says.

Fixes #795

Prompt: Fix 782, 799, 598, 795, 805, 806 [python-caldav issues; this commit is #795].  The small ones can share one PR, the bigger ones should probably have separated PRs.  (...)

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
The sync client encoded a str password to UTF-8 bytes, only to decode
it again before building the auth object, so the public attribute was
bytes on DAVClient and str on AsyncDAVClient.  It is now kept as given.
multiget() is annotated to return a coroutine for an async client, like
search(), so a type checker no longer lets that be iterated.

Fixes #799

Prompt: Fix 782, 799, 598, 795, 805, 806 [python-caldav issues; this commit is #799].  The small ones can share one PR, the bigger ones should probably have separated PRs.  (...)

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
An AuthorizationError did not say whether it came from a 401 or a 403,
so a caller could not tell bad credentials from a missing permission
other than by guessing from the reason phrase.  DAVError now has a
status attribute, set from the response for the AuthorizationError and
for the errors error_from_response() builds.

Fixes #805

Prompt: Fix 782, 799, 598, 795, 805, 806 [python-caldav issues; this commit is #805].  The small ones can share one PR, the bigger ones should probably have separated PRs.  (...)

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Where caldav searches for the UID itself before save(no_overwrite=True),
a hit raised a plain ConsistencyError, the same as for "something is
stored at this URL".  A hit under another URL now raises the same
UidConflictConsistencyError the server's no-uid-conflict precondition
gives, so the error no longer depends on the server's hints.

Fixes #806

Prompt: Fix 782, 799, 598, 795, 805, 806 [python-caldav issues; this commit is #806].  The small ones can share one PR, the bigger ones should probably have separated PRs.  (...)

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
calendar_multiget() iterates the coroutine multiget() returns for an
async client; noted for later.

Prompt: [fix issues found during the review process; this one filed for later]

Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen
tobixen merged commit 272a505 into master Oct 20, 2026
17 checks passed
@tobixen
tobixen deleted the small-fixes-799-805-806-795 branch October 20, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment