Merged
Conversation
a364e98 to
49b3e8e
Compare
The async factory functions already existed in caldav.async_davclient but were not re-exported from caldav.aio, leaving no parity with the sync API where caldav.get_calendars / caldav.get_calendar are available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… invite methods Similar to the save()/complete() fix in e819a3a, these methods called self.save() or self.parent.get_object_by_uid() without awaiting, so in async mode the returned coroutines were silently discarded. Changes: - uncomplete(): delegate to new _async_uncomplete() when is_async_client - set_relation(): refactor uid/other resolution to share between sync and async paths; delegate to new _async_set_relation() when is_async_client; extract _add_relation_to_ical() helper to avoid duplicating ical logic - get_relatives(): extract _parse_relatives_from_ical() helper (pure, no I/O) to avoid duplicating ical-parsing logic; delegate to new _async_get_relatives() when is_async_client - _reply_to_invite_request() / accept_invite() / decline_invite() / tentatively_accept_invite(): raise NotImplementedError for async clients (the entire invite reply flow uses load/save/add_event/schedule_outbox which all require async-aware wiring not yet implemented) Tests: add TestAsyncCalendarObjectResource with 6 unit tests that verify each fixed method returns a coroutine for async clients and that awaiting it produces the expected side-effects. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…thout await _async_add_object_finish called _handle_reverse_relations(fix=True), which internally called self.get_relatives() — returning a coroutine in async mode instead of the dict, causing TypeError: 'coroutine' object is not iterable. Added _async_set_reverse_relation, _async_verify_reverse_relation, and _async_handle_reverse_relations; updated _async_add_object_finish to await the new async variant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add docs/source/async_tutorial.rst, a step-by-step async tutorial that mirrors the existing sync tutorial.rst. Covers the same topics (creating calendars, accessing calendars, creating events, searching, investigating events, modifying events, tasks) plus a "Parallel Operations" section demonstrating asyncio.gather(). Also update tutorial.rst to link to the new async tutorial instead of saying "will come soon", and add async_tutorial to the docs index. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tives Documents the structural problem with the current is_async_client branching approach: silent coroutine discard, incorrect type annotations, growing method-pair count, and which methods still lack async support. Also covers alternative designs (separate async classes, full sans-IO) and practical recommendations (mandatory coroutine tests, type overloads, lint rule). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a "Testing server compatibility" section to configfile.rst explaining how to find, install, and run caldav-server-tester, and how to use its output to populate the features key in calendar.conf. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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.
New async tutorial + some bugfixes on the async API