Skip to content

More v3.0 development#630

Open
tobixen wants to merge 6 commits intomasterfrom
v3.0-dev
Open

More v3.0 development#630
tobixen wants to merge 6 commits intomasterfrom
v3.0-dev

Conversation

@tobixen
Copy link
Member

@tobixen tobixen commented Feb 28, 2026

No description provided.

tobixen and others added 6 commits February 28, 2026 17:15
When using AsyncDAVClient, CalendarObjectResource.save() returns a
coroutine. Collection.add_object() was calling o.save() and then
immediately accessing o.url, crashing with AttributeError because
o was a coroutine, not the saved object.

Fix by routing through _async_add_object_finish() when is_async_client,
which awaits save() before checking o.url and calling _handle_reverse_relations().

Fixes #631

Co-Authored-By: Claude <noreply@anthropic.com>
TestAsyncCalendarAddObject was assigning AsyncMock directly onto
AsyncEvent._async_create at class level. Since AsyncEvent is an alias
for Event, this left the mock in place for all subsequent tests,
breaking test_async_integration.py.

Replace with patch.object() context manager so the mock is restored
after each test.

Co-Authored-By: Claude <noreply@anthropic.com>
Three tests for TestForServerStalwart were failing:
- testTodoDatesearch (assert 3==5, then DTSTART expansion check)
- testRecurringDateSearch (assert 0==1)
- testRecurringDateWithExceptionSearch (assert 3==2)

Compatibility hints added for Stalwart:
- search.recurrences.includes-implicit.event: fragile (works for
  datetime events but not for all-day/VALUE=DATE events)
- search.recurrences.includes-implicit.todo: fragile (server returns
  recurring todos but expansion doesn't work reliably)
- search.recurrences.expanded.exception: unsupported (server-side
  expansion is wrong for events with exceptions)
- save-load.event.recurrences.exception: unsupported (Stalwart stores
  master+exception VEVENTs as separate calendar objects)
- vtodo_datesearch_nodtstart_task_is_skipped old_flag (already existed
  in prior commits but consolidated here)
- no_search_openended old_flag (open-ended VTODO date searches fail)

Library behavior change (search.py): when expand=True is requested and
the server splits exception VEVENTs into separate objects (unsupported
save-load.event.recurrences.exception), automatically fall back to
server-side CALDAV:expand when the server supports it correctly.

Test changes:
- testRecurringDateWithExceptionSearch: guard "assert len(r)==2" and
  "assert len(rs)==2" for servers that can't handle exceptions; the rs
  assertion now also requires expanded.exception support
- testTodoDatesearch: guard isinstance(todos[0]) assertions with
  no_search_openended flag (consolidating todos1/todos2/todos3 under
  one condition)

New FEATURES entry: save-load.event.recurrences.exception

Co-Authored-By: Claude <noreply@anthropic.com>
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