Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion caldav/calendarobjectresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions caldav/compatibility_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down Expand Up @@ -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"},
Expand Down
4 changes: 2 additions & 2 deletions caldav/lib/vcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -146,7 +146,7 @@ def fix(event):
fixed = re.sub(r"(?<![ \t])[ \t]+$(?!\n[ \t])", "", fixed, flags=re.MULTILINE)

## 7) drop empty CATEGORIES lines (not followed by a folded continuation).
## Temporary workaround for https://github.com/collective/icalendar/issues/1722
## Temporary workaround for https://github.com/PyCalendar/icalendar/issues/1722
fixed = re.sub(r"^CATEGORIES(?:;[^:\n]*)?:\r?\n(?![ \t])", "", fixed, flags=re.MULTILINE)

## 8) drop a VTIMEZONE without STANDARD or DAYLIGHT. Stopping at any
Expand Down
1 change: 1 addition & 0 deletions changes/+todo-alarm.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New server hint `save-load.todo.alarm`: whether a task's alarm is stored as sent. Ox keeps it, but makes its trigger absolute and replaces its description.
4 changes: 2 additions & 2 deletions docs/design/FEATURE_COMPLETE_ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ external `icalendar_searcher` library, which `search.py` imports.

- **Priority:** Medium
- **Estimated effort:** 24-40 hours
- **Related issues:** [#659](https://github.com/python-caldav/caldav/issues/659), [#664](https://github.com/python-caldav/caldav/issues/664), [#665](https://github.com/python-caldav/caldav/issues/665), [#698](https://github.com/python-caldav/caldav/issues/698), [#634](https://github.com/python-caldav/caldav/issues/634), [#94](https://github.com/python-caldav/caldav/issues/94), [icalendar#1922](https://github.com/collective/icalendar/issues/1922)
- **Related issues:** [#659](https://github.com/python-caldav/caldav/issues/659), [#664](https://github.com/python-caldav/caldav/issues/664), [#665](https://github.com/python-caldav/caldav/issues/665), [#698](https://github.com/python-caldav/caldav/issues/698), [#634](https://github.com/python-caldav/caldav/issues/634), [#94](https://github.com/python-caldav/caldav/issues/94), [icalendar#1922](https://github.com/PyCalendar/icalendar/issues/1922)

Housekeeping that does not change what the library can do, but that the code
needs. Collected here so the roadmap does not pretend the backlog is only
Expand All @@ -596,7 +596,7 @@ features.
- [ ] `object.id` should always work ([#94](https://github.com/python-caldav/caldav/issues/94))
- [ ] Keep the raw string and the icalendar object side by side instead of
either-or, and skip saving unmodified objects. Needs change tracking in
`icalendar`, requested in [icalendar#1922](https://github.com/collective/icalendar/issues/1922)
`icalendar`, requested in [icalendar#1922](https://github.com/PyCalendar/icalendar/issues/1922)
- [ ] v4.0: a major API review — no issue for this, and it is the kind of thing
that needs one before it means anything

Expand Down
2 changes: 1 addition & 1 deletion tests/test_vcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def test_drop_empty_categories(self) -> 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"
Expand Down
Loading