Repository navigation
Small fixes: propfind values, password type, DAVError.status, UID conflicts - #807
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: AI-generated code and text below the line, generated by Claude Opus 5.5, from the prompt:
The small issues from that list, one commit each:
_element_to_valuefallback) #795 -supported-report-setandcurrent-user-privilege-setfrompropfind()are now lists of report and privilege names (empty when the set is empty), not the raw lxml element.DAVClient.passwordis now kept as thestrit was given, as onAsyncDAVClient, andCalendar.multiget()is annotated to return a coroutine for an async client.DAVErrorhas a newstatusattribute with the HTTP status code, so anAuthorizationErrortells 401 from 403. It is kept on the UID-conflict errors and onRateLimitErrortoo.save(no_overwrite=True)now raisesUidConflictConsistencyErrorwhen another object holds the UID, as it does when the server refuses it.Also piggy-backing two TODO entries in
docs/design/TODO.md: config errors fromextract_conn_params_from_sectionnaming no section, andcalendar_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