diff --git a/CHANGELOG.md b/CHANGELOG.md index d40dc3e1..00e7036d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -300,7 +300,7 @@ These are bug fixes, but code relying on the old behaviour may notice them. * `Todo.complete(handle_rrule=True, rrule_mode="safe")` on a recurring task with no further occurrences (e.g. `COUNT=1`) ignored the given `completion_timestamp` and stamped `COMPLETED` with the current time. The sync path now passes it on, as the async one already did. https://github.com/python-caldav/caldav/pull/746 * The same fallback, reached through an `RRULE` with both `COUNT` and `UNTIL` (invalid, but seen in the wild), saved the task with `COUNT` lowered by one. `COUNT` is now only touched once a next occurrence is found. https://github.com/python-caldav/caldav/pull/746 * `change_attendee_status()` now awaits async principal and address discovery when the attendee is omitted or a Principal is passed, filters empty addresses, and shares the principal URL and username fallbacks with invite replies. Explicit attendee strings remain synchronous. https://github.com/python-caldav/caldav/issues/678 https://github.com/python-caldav/caldav/pull/734 -* Empty `CATEGORIES:` lines are dropped when calendar data is loaded. The icalendar library inserts one when the `categories` of a component without categories is read, so such tasks could end up with both `CATEGORIES:` and the real CATEGORIES line. Data saved from such a component is not cleaned until it is loaded again. Temporary workaround for https://github.com/collective/icalendar/issues/1722 https://github.com/python-caldav/caldav/pull/773 +* Empty `CATEGORIES:` lines are dropped when calendar data is loaded. The icalendar library inserts one when the `categories` of a component without categories is read, so such tasks could end up with both `CATEGORIES:` and the real CATEGORIES line. Data saved from such a component is not cleaned until it is loaded again. Temporary workaround for https://github.com/PyCalendar/icalendar/issues/1722 https://github.com/python-caldav/caldav/pull/773 * The warning logged when `vcal.fix()` modifies icalendar data no longer says the calendar server broke the standard - the server, the client or a library in between may be the cause. https://github.com/python-caldav/caldav/pull/773 #### Configuration diff --git a/caldav/calendarobjectresource.py b/caldav/calendarobjectresource.py index 073df78f..774aa389 100644 --- a/caldav/calendarobjectresource.py +++ b/caldav/calendarobjectresource.py @@ -455,7 +455,7 @@ def _add_relation_to_ical(self, uid, reltype) -> bool: # without str(…), icalendar ignores properties # because if type(uid) == vText # then Component._encode does miss adding properties - # see https://github.com/collective/icalendar/issues/557 + # see https://github.com/PyCalendar/icalendar/issues/557 # workaround should be safe to remove if issue gets fixed self.icalendar_component.add( "related-to", str(uid), parameters={"RELTYPE": reltype}, encode=True diff --git a/caldav/compatibility_hints.py b/caldav/compatibility_hints.py index 91f3bdde..fcea0700 100644 --- a/caldav/compatibility_hints.py +++ b/caldav/compatibility_hints.py @@ -496,6 +496,7 @@ class FeatureSet: "save-load.todo.mixed-calendar": {"description": "The same calendar may contain both events and tasks (Zimbra only allows tasks to be placed on special task lists)", "default": {"support": "full"}}, "save-load.todo.uncomplete": {"description": "A completed task can be made pending again (Todo.uncomplete()): after saving it with STATUS:NEEDS-ACTION and without COMPLETED, it loads back that way.", "default": {"support": "full"}}, "save-load.todo.attendee": {"description": "A task with an ATTENDEE (RFC 5545 section 3.6.2 allows it in a VTODO) is stored with it. The probe sends no ORGANIZER, so no scheduling applies. 'unsupported' when the ATTENDEE is dropped. 'broken' when the task with it is gone although the PUT succeeded: the PUT is answered with 201 and the GET with 404, while the same task without the ATTENDEE is kept. 'ungraceful' when it is refused (Ox, with 409).", "default": {"support": "full"}}, + "save-load.todo.alarm": {"description": "A task's VALARM is stored as sent: its TRIGGER, relative to the task's DTSTART, and its DESCRIPTION. A property the server adds to the VALARM, such as a UID, is fine. 'unsupported' when the VALARM is dropped. 'broken' when it is kept but rewritten (Ox makes the TRIGGER absolute, so the alarm no longer follows the task when it is moved), the behaviour saying what was changed: the alarm is still there, but not the one sent, which is worse than a missing one.", "default": {"support": "full"}, "links": ["https://datatracker.ietf.org/doc/html/rfc5545#section-3.6.6", "https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.6.3"]}, "save-load.todo.status": { "description": "Each STATUS RFC 5545 section 3.8.1.11 gives a task (NEEDS-ACTION, IN-PROCESS, COMPLETED, CANCELLED) is stored as sent. 'unsupported' when one is dropped or stored as another, 'ungraceful' when a task with one is refused, the worse of the two where both apply; the extra keys say which. Zimbra refuses CANCELLED. The statuses RFC 10051 adds are save-load.todo.status.rfc10051.", "default": {"support": "full"}, @@ -3200,6 +3201,9 @@ def __getattr__(name: str) -> Any: "save-load.icalendar.unknown-property": {"support": "unsupported", "behaviour": "ESTIMATED-DURATION is dropped"}, "save-load.todo.attendee": {"support": "ungraceful", "behaviour": "a task with an ATTENDEE is refused (409)"}, "save-load.todo.completed-without-status": {"support": "unsupported", "behaviour": "COMPLETED is dropped"}, + ## Probed 2026-11-08 by caldav-server-tester. An event's VALARM Ox + ## keeps as sent (seen by hand). + "save-load.todo.alarm": {"support": "broken", "behaviour": "the alarm's TRIGGER -PT15M is stored as TRIGGER;VALUE=DATE-TIME:20270120T114500Z; its DESCRIPTION is stored as Open-XChange"}, ## Probed 2026-11-03 by caldav-server-tester "save-load.todo.status.rfc10051": {"support": "unsupported", "behaviour": "PENDING is dropped; FAILED is dropped; the server does not advertise RFC 10051", "values": [], "map": {}, "refused": []}, "supported-task-modes": {"support": "unsupported", "behaviour": "neither the calendar home nor a calendar has CALDAV:supported-task-mode-set"}, diff --git a/caldav/lib/vcal.py b/caldav/lib/vcal.py index efa28bfd..d0dd02a7 100644 --- a/caldav/lib/vcal.py +++ b/caldav/lib/vcal.py @@ -98,7 +98,7 @@ def fix(event): 7) An empty CATEGORIES line holds no category. The icalendar library inserts one when ``component.categories`` is read on a component without categories - (https://github.com/collective/icalendar/issues/1722), and it ends up + (https://github.com/PyCalendar/icalendar/issues/1722), and it ends up stored next to the real CATEGORIES line. Drop it. This is a temporary workaround until the upstream bug is fixed. @@ -146,7 +146,7 @@ def fix(event): fixed = re.sub(r"(? None: """An empty CATEGORIES line holds no category and is dropped. icalendar's ``component.categories`` accessor inserts one when there - is none (https://github.com/collective/icalendar/issues/1722), so + is none (https://github.com/PyCalendar/icalendar/issues/1722), so tasks end up with ``CATEGORIES:`` next to the real CATEGORIES line. """ head = "BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VTODO\nUID:test\nDTSTAMP:20190103T070319Z\n"