Skip to content

More v3.0 development#630

Merged
tobixen merged 3 commits intomasterfrom
v3.0-dev
Mar 2, 2026
Merged

More v3.0 development#630
tobixen merged 3 commits intomasterfrom
v3.0-dev

Conversation

@tobixen
Copy link
Copy Markdown
Member

@tobixen tobixen commented Feb 28, 2026

No description provided.

tobixen and others added 3 commits March 2, 2026 12:42
Calendar.add_object() was calling o.save() without await, so with an
AsyncDAVClient the method returned a coroutine object instead of an
awaited Event/Todo.  Added _async_add_object_finish() helper that
properly awaits save() and handles reverse relations, and route async
clients through it.

Added regression tests in TestAsyncCalendarAddObject:
- test_add_event_returns_coroutine_with_async_client: verifies the
  return value is awaitable
- test_add_event_result_has_url: verifies the awaited result has a URL

Also fixes test pollution in test_async_davclient.py: switched from
direct class attribute mutation (AsyncEvent._async_create = AsyncMock())
to patch.object(), which restores the original after the test.

Co-Authored-By: Claude <noreply@anthropic.com>
Stalwart has several non-RFC-conformant behaviours uncovered during
integration testing:

* VALUE=DATE (all-day) recurring events are not returned by time-range
  searches even though datetime recurring events are.  Marked as
  search.recurrences.includes-implicit.event: fragile (broken for
  VALUE=DATE events).

* Recurring VTODOs are returned in search results but without the RRULE,
  so client-side expansion cannot find specific occurrences.  Marked as
  search.recurrences.includes-implicit.todo: fragile.

* Server-side CALDAV:expand is broken for events with exceptions (returns
  3 items instead of 2, because exceptions are stored as separate objects).
  Marked as search.recurrences.expanded.exception: unsupported.

* Master+exception VEVENTs are stored as separate CalendarObjectResources
  rather than as a single multi-VEVENT object (RFC violation).  New feature
  flag save-load.event.recurrences.exception tracks this; when unsupported,
  CalDAVSearcher now falls back to server-side CALDAV:expand (if available)
  so client-side expansion of the master alone does not yield duplicates.

* VTODO date searches with no DTSTART on the task are skipped; open-ended
  VTODO date searches return no results.  Covered by existing old-flags
  vtodo_datesearch_nodtstart_task_is_skipped and new no_search_openended.

Test assertions in testRecurringDateWithExceptionSearch and
testTodoDatesearch are now guarded by the appropriate feature flags so
the tests pass (or skip gracefully) on Stalwart.

Also fix a KeyError crash in setUp when a rate-limit features dict lacks
'interval' or 'count' keys (e.g. Stalwart's rate-limit config uses
default_sleep/max_sleep, not interval/count).

Co-Authored-By: Claude <noreply@anthropic.com>
The icalendar >7.0.0 requirement was premature; no released 3.x code
actually requires icalendar 7 features.  Reverted to >6.0.0 to avoid
breaking environments that haven't upgraded yet.

xandikos >=0.3.3 is now required for tests: earlier versions lack the
rate-delay configuration fields exercised by the integration test suite.

Co-Authored-By: Claude <noreply@anthropic.com>
@tobixen tobixen merged commit 0911f1d into master Mar 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant