Conversation
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>
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.
No description provided.