NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #4946 most downloaded on PyPI
CalDAV (RFC4791) client library
Latest stable
3.7.0
Last release 24 days ago
29 Oct 2026
Release timing varies
gaps range from 1 weeks to 3 months
Some releases are documented
notes for 35 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
16 years old
85 releases · first in 2010
Drag across the ruler to compare, or tap a release to open it.
This is the fourth minor release in less than a month - lots of work has gone into supporting the development of two other libraries, calendaring and
v3.7.0
This is the fourth minor release in less than a month - lots of work has gone into supporting the development of two other libraries, calendaring and calendaring-sync, plus fixing lots of compatibility problems, mainly reported by users of iCloud. It's not sustainable for me to spend this much time on the caldav library, so I don't expect any more minor releases for at least a month.
Most of this release is server compatibility work: some two dozen new compatibility features, many of them found by the conformance suites of calendaring and calendaring-sync, each probed by caldav-server-tester (1.8.0 will be released soon), and the server profiles updated to match. Notably, iCloud does not allow search by UID. My aim is to maximize the user experience, which means a best effort at supporting iCloud without making life too hard for others. In the worst case it's necessary to download the whole calendar and find the UID client-side - which can be quite taxing if the calendar is big, or the client system is short on resources or on metered bandwidth.
Also released without the niquests dependency as 3.7.0a0 - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
Nothing big, but read the full CHANGELOG to see the details
This is the fourth minor release in less than a month - lots of work has gone into supporting the development of two other libraries, calendaring and calendaring-sync, plus fixing lots of compatibility problems, mainly reported by users of iCloud. It's not sustainable for me to spend this much time on the caldav library, so I don't expect any more minor releases for at least a month.
Most of this release is server compatibility work: some two dozen new compatibility features, many of them found by the conformance suites of calendaring and calendaring-sync, each probed by caldav-server-tester (1.8.0 will be released soon), and the server profiles updated to match. Notably, iCloud does not allow search by UID. My aim is to maximize the user experience, which means a best effort at supporting iCloud without making life too hard for others. In the worst case it's necessary to download the whole calendar and find the UID client-side - which can be quite taxing if the calendar is big, or the client system is short on resources or on metered bandwidth.
Also released without the niquests dependency as 3.7.0a0 - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
These are bug fixes or improvements, but code or configuration relying on the old behaviour may notice them.
A request other than GET and HEAD that is redirected to another host or port is no longer followed; save() raises PutError on it. Redirects on the same host are now repeated with method and body. See "Fixed" below. https://github.com/python-caldav/caldav/pull/837
With a hand-written list of compatibility features marking search.text as unsupported, broken or ungraceful, looking up an object by UID no longer searches but fetches <uid>.ics and, failing that, all objects of the type. Set search.text.uid: full if a search by UID works on that server. See "Added" below. https://github.com/python-caldav/caldav/pull/826
Where the server refuses a duplicate UID unrecognisably (save.no-uid-conflict ungraceful), save(no_overwrite=True) may raise PutError or AuthorizationError rather than UidConflictConsistencyError for a UID taken under another URL. See "Changed" below. https://github.com/python-caldav/caldav/pull/826
The sync-collection REPORT is sent with Depth: 0, and the depth parameter of AsyncDAVClient.sync_collection() defaults to 0. https://github.com/python-caldav/caldav/pull/818
Some names are deprecated and now give a warning, which matters to code run with warnings as errors. https://github.com/python-caldav/caldav/pull/830, https://github.com/python-caldav/caldav/pull/839
get-supported-components is renamed supported-components.property-exists.zimbra profile has been split into zimbra_8_8 (latest public docker image) and zimbra_10_1; features: zimbra still works, as zimbra_8_8.testing_allowed and priority, deprecated since 3.6.0 in favour of test_allowed and test_priority, now give a visible warning.UidConflictError.href (see RFC 4791 section 5.3.2.1 - a wish from the calendaring-sync side, which currently parses the response body for it). It is None where the server names none. https://github.com/python-caldav/caldav/issues/756, https://github.com/python-caldav/caldav/pull/833Lots of new compatibility features have been added to caldav/compatibility_hints.py. They are all probed by the caldav-server-tester tool.
Features the library acts on:
search.text.uid: a calendar-query with a UID filter works. Some servers support a search by UID without supporting other text searches, and vice versa: iCloud answers a search by UID with 412 (https://github.com/python-caldav/caldav/issues/783). Where it is not supported, the library falls back to fetching <uid>.ics and, failing that, all objects of the type. Where it is not set, it follows search.text (see "Potentially breaking changes" above); the iCloud profile sets it to ungraceful. Ox and Robur ignore a UID filter and return objects that do not match it, so their profiles set it to unsupported: a lookup by UID there now fetches <uid>.ics first, where 3.6.0 in effect downloaded all objects of the type and filtered them, on every call. Zimbra and Bedework handle a UID filter although other text searches fail there, so their profiles set it to full. https://github.com/python-caldav/caldav/pull/826forces_uid_ics on the compatibility feature save-load.stable-url tells that a server names every object <uid>.ics whatever name it was PUT to. get_object_by_uid() then treats a missing <uid>.ics as conclusive and skips the full scan. https://github.com/python-caldav/caldav/pull/826save.no-uid-conflict, with the new quirk level and its keys status and precondition, and the new save.no-uid-conflict.if-none-match: see "Changed" below. https://github.com/python-caldav/caldav/pull/826Features only recorded - the library itself does not act on these yet. They are set in the server profiles, where the test suite and other software (like calendaring-sync) can check them with is_supported(). The servers named are examples; the profiles in caldav/compatibility_hints.py have the full picture:
save.no-uid-conflict.href-given says whether a server refusing a duplicate UID names the object holding it (UidConflictError.href), as RFC 4791 section 5.3.2.1 says it SHOULD. https://github.com/python-caldav/caldav/pull/826search.limit: a calendar-query answers every object it matches. Stalwart answers at most its maxResults, with a 507 for the collection, as it does for a multiget or a Depth: 1 PROPFIND. https://github.com/python-caldav/caldav-server-tester/issues/41, https://github.com/python-caldav/caldav/pull/830delete.if-match: a DELETE with a stale If-Match is refused with 412. SOGo deletes the object anyway, while it refuses a stale If-Match on PUT. https://github.com/python-caldav/caldav/pull/822save-load.event.floating: an event with a floating DTSTART/DTEND is stored floating. SOGo pins it to TZID=Etc/UTC. https://github.com/python-caldav/caldav/pull/822save-load.icalendar.attendee-params: ATTENDEE parameters are stored as sent. SOGo adds RSVP=TRUE, which changes the meaning, as the default is FALSE. https://github.com/python-caldav/caldav/pull/822supported-components.honoured: a calendar accepts exactly the component types its supported-calendar-component-set lists, and all of them where it lists none, as RFC 4791 section 5.2.3 requires. Bedework 3.10, DAViCal, Synology and Stalwart report a VTODO-only set yet take a VEVENT, so they are broken. https://github.com/python-caldav/caldav/pull/830create-calendar.with-supported-component-types.multiple: a MKCALENDAR naming several component types gives a calendar taking them all. CCS refuses a two-type MKCALENDAR, so it is unsupported. https://github.com/python-caldav/caldav/pull/830delete.missing: a DELETE of a missing object answers 404. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822delete.missing.if-match: a DELETE with If-Match of a missing object answers as the plain one does. Baikal, Davis, Nextcloud, CCS, Ox, Robur, Purelymail and Infomaniak answer 412. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822save.etag.matches-stored: a strong ETag in a PUT answer belongs to what was stored. Radicale, Xandikos, SOGo, CCS, Zimbra, Bedework 5 and Infomaniak rewrite the object and still answer with one. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822sync-token.initial-sync: a sync-collection report from an empty token lists exactly the current members. Radicale also lists deleted members, Stalwart the collection itself. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822sync-token.delete.created-and-deleted: a member created and deleted again between two sync reports is reported as removed. Xandikos and Stalwart do not mention it at all. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822sync-token.recreated: a member deleted and re-created at the same href between two sync reports is reported once, as changed. Stalwart reports it twice, Nextcloud and Synology as removed only. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822multiget: the calendar-multiget REPORT works. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822multiget.missing-href: a calendar-multiget answers a missing href with a 404. Baikal leaves it out. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822multiget.limit: a calendar-multiget answers every href. Stalwart stops at its maxResults, with a 507. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822propfind.limit: a Depth: 1 PROPFIND lists every member. Stalwart stops at its maxResults, with a 507. The Stalwart test container now runs with a maxResults of 50 (STALWART_MAX_RESULTS), so the limit can be probed with few objects. Found by calendaring-sync (https://github.com/pycalendar/calendaring-sync/blob/c40782bc7afe7b350fe63bf27ef13374c280ea8b/docs/reference/server-compatibility.rst). https://github.com/python-caldav/caldav/pull/822save-load.icalendar.x-property: an X- property is kept, in an event and in a task. Ox drops it from a task. Found on Ox by the conformance suite of calendaring. https://github.com/python-caldav/caldav-server-tester/issues/40, https://github.com/python-caldav/caldav/pull/830save-load.icalendar.unknown-property: a property RFC 5545 does not define, ESTIMATED-DURATION in the probe, is kept. Found on Ox by the conformance suite of calendaring. https://github.com/python-caldav/caldav-server-tester/issues/40, https://github.com/python-caldav/caldav/pull/830save-load.todo.attendee: a task with an ATTENDEE is stored. Ox refuses it with 409: ungraceful. Found on Ox by the conformance suite of calendaring. https://github.com/python-caldav/caldav-server-tester/issues/40, https://github.com/python-caldav/caldav/pull/830save-load.todo.completed-without-status: a task with COMPLETED but no STATUS keeps its COMPLETED. Found on Ox by the conformance suite of calendaring. https://github.com/python-caldav/caldav-server-tester/issues/40, https://github.com/python-caldav/caldav/pull/830save-load.icalendar.participant: an RFC 9073 PARTICIPANT inside a VEVENT is stored. CCS and Bedework 3 refuse the event with 403, Robur with 400, GMX and Ox with 500. Found by the conformance suite of calendaring (https://github.com/pycalendar/calendaring). https://github.com/python-caldav/caldav-server-tester/issues/38, https://github.com/python-caldav/caldav/pull/830save-load.icalendar.vtimezone: the VTIMEZONE sent with an object comes back with it. CCS returns the TZID without it. Found by the conformance suite of calendaring (https://github.com/pycalendar/calendaring). https://github.com/python-caldav/caldav-server-tester/issues/39, https://github.com/python-caldav/caldav/pull/830features: <server> configured, is_supported() may answer differently than in 3.6.0: Radicale and Purelymail advertise a component set without enforcing it (supported-components.honoured broken), and what Ox reads back as colour name depends on earlier writes (calendar-color.name fragile). https://github.com/python-caldav/caldav/pull/836, https://github.com/python-caldav/caldav/pull/838The deprecated config keys testing_allowed and priority now give a FutureWarning instead of a DeprecationWarning, which Python hides by default, so whoever edits the config file actually gets to see it. https://github.com/python-caldav/caldav/pull/839
Servers MUST NOT allow duplicate UIDs within a calendar (RFC 4791 section 5.3.2.1). save(no_overwrite=True) no longer searches the calendar for the UID before the PUT if the server is known to refuse a duplicate UID. Unfortunately some servers happily store duplicates in the same calendar, so where save.no-uid-conflict is not configured, the library still searches. https://github.com/python-caldav/caldav/pull/826
save.no-uid-conflict ungraceful, e.g. a bare 403). The icloud and bedework_* profiles now record that iCloud and Bedework refuse a duplicate (with a bare 412 to If-None-Match: *), so with them configured, save(no_overwrite=True) skips the search, which iCloud would refuse and the library would replace by downloading the whole calendar.If-None-Match: * (save.if-none-match unsupported), so the library has to check by itself that the URL is free. Where the server also refuses a duplicate UID and keeps an object at the URL it was saved to (save-load.stable-url), as SOGo does, a GET of that URL now does the check instead of the search; the same UID under another URL is left for the server to refuse.ungraceful, as in the Purelymail profile) raises what its refusal gives - a ConsistencyError for a 412, otherwise a PutError or AuthorizationError - rather than UidConflictConsistencyError.save.no-uid-conflict is graded by a plain PUT, and a server refusing a duplicate UID in a way the RFC does not prescribe can be a quirk the library works around, with the extra keys status and precondition. With the precondition but a status other than 403 or 409 (Xandikos, Stalwart: 412) the library goes by the body, as before. With a bare status (SOGo: 409), save() now raises UidConflictError (UidConflictConsistencyError with no_overwrite or no_create) where a GET finds nothing at the URL (only on a server answering 404 for a missing object, non-existing-raises-not-found.object); a bare 403 is not taken for a UID conflict, since a read-only calendar answers it too. The new save.no-uid-conflict.if-none-match does the same for a PUT carrying If-None-Match: *, which some servers answer otherwise (Bedework: 403 with the precondition to a plain PUT, a bare 412 to this one). iCloud refuses both with a bare 412, so there save() raises UidConflictError too. https://github.com/python-caldav/caldav/pull/826
zimbra compatibility profile is renamed zimbra_8_8, as it was measured against a Zimbra 8.8 docker image, and zimbra_10_1 is added: Zimbra 10.1 refuses a PUT of a UID the calendar already holds with 412 rather than 403 or 409. The old name still works, as zimbra_8_8: features: zimbra or base: zimbra in a config gives a FutureWarning, and compatibility_hints.zimbra in code a DeprecationWarning. https://github.com/python-caldav/caldav/pull/839get-supported-components is now supported-components.property-exists, under a new grouping node supported-components for the CALDAV:supported-calendar-component-set property. A configuration setting the old name, or is_supported("get-supported-components"), still works and gives a DeprecationWarning. The Robur and Purelymail profiles use the new name. https://github.com/python-caldav/caldav/pull/830get_object_by_uid() and get_event_by_uid(), get_todo_by_uid(), ... failed on servers that refuse the search by UID, such as iCloud (412), and so did save() of a single recurrence, save(no_overwrite=True) and, with the icloud profile, save(no_create=True). Two fallbacks have been implemented (https://github.com/python-caldav/caldav/issues/783, https://github.com/python-caldav/caldav/pull/826):
<uid>.ics, when the search fails or is skipped - on all servers, unless search.text.uid is configured as supported.search.text.uid is configured as unsupported, broken or ungraceful. On such servers, looking up a UID that is missing or not stored as <uid>.ics downloads all objects of the type, on every call. Servers that always name an object <uid>.ics can say so with forces_uid_ics on save-load.stable-url, and then a missing UID does not cost a full download.A PUT that the server redirected with a 302 was followed by niquests/requests as a GET without the body, so the data was lost without an error; with httpx save() even reported success and moved the object's url to the Location. Zimbra does this with an object saved under a name other than <uid>.ics: it answers 302 to <uid>.ics and stores nothing. A request other than GET and HEAD answered with 301, 302, 307 or 308 is now repeated at the Location with its method and body, if that is on the same host, port and scheme (or an upgrade from http to https), and save() and calendar creation move the url there. A 303 to a PUT is taken as success, with the object at the Location. A redirect to another host or port, followed before by the HTTP library for methods other than PUT, is no longer followed; save() raises PutError on it instead of reporting success. https://github.com/python-caldav/caldav/pull/837
An href is decoded once. A UID holding a / is stored as %252F by save() and by iCloud, and a second decode turned that into a /: search(), children() and sync results for a UID that is a URL pointed at a URL that named nothing, multiget() returned any object with a / in its UID under a URL that does not exist, and a search() that loads its results with a multiget dropped such objects without a word. calendars() did the same to a calendar whose name holds a /. https://github.com/python-caldav/caldav/issues/835, https://github.com/python-caldav/caldav/pull/836
vcal.fix() now drops a VTIMEZONE without any STANDARD or DAYLIGHT observance, as written by OneCalendar. vobject could not parse such an object, so vobject_instance raised and Home Assistant's CalDAV integration stopped loading the whole calendar. The TZID is now resolved by name. https://github.com/python-caldav/caldav/issues/831, https://github.com/python-caldav/caldav/pull/832
The sync client raised ImportError on calendar and object operations when no async HTTP library was installed (e.g. a requests-only install). https://github.com/python-caldav/caldav/pull/827
The sync-collection REPORT (Calendar.get_objects_by_sync_token(), AsyncDAVClient.sync_collection()) is now sent with Depth: 0, as RFC 6578 section 3.2 requires, instead of Depth: 1; the depth parameter of AsyncDAVClient.sync_collection() now defaults to 0. None of the servers in the test suite behaves differently, but a strict server may reject the old request with a 400. https://github.com/python-caldav/caldav/pull/818
A ResponseError raised for a failed PROPFIND, REPORT or sync-collection reply, or for a failing <propstat> status inside a multistatus (e.g. 507 Insufficient Storage), now has its status attribute set; it was None, so the code had to be parsed out of the message. The failed replies also keep body and preconditions, like other DAVErrors. https://github.com/python-caldav/caldav/pull/819
Calendar.get_objects_by_sync_token() no longer raises when a server answers a removed member with an extra propstat carrying an unexpected status: the propstats of a response whose own status is 404 are now ignored. Infomaniak adds an empty propstat with "418 I'm a teapot" to every removed member. https://github.com/python-caldav/caldav/pull/821
ServerRegistry, get_registry(), the config loader and the Docker and external server classes) is now part of the installed package and exported as caldav.testing. The docker-compose files stay in the repository: set CALDAV_DOCKER_TEST_SERVERS_DIR to tests/docker-test-servers of a checkout to start the Docker servers from an installed caldav. get_davclient() with PYTHON_CALDAV_USE_TEST_SERVER=1 now picks from that registry on an installed caldav too, so the servers in ~/.config/caldav/test_servers.yaml are candidates there as well. https://github.com/python-caldav/caldav/issues/817, https://github.com/python-caldav/caldav/pull/824tests/caldav_test_servers.yaml, ~/.config/caldav/test_servers.yaml (and their .json variants) and the test_allowed sections of the caldav configuration file. Before, the first source found was used alone, so a test-server yaml hid the test_allowed servers. On a name clash the source listed first wins. tests/caldav_test_servers.yaml is now looked up in the checkout instead of relative to the current directory, and ExternalTestServer.is_accessible() checks that the server's host accepts connections on its port instead of always returning True. https://github.com/python-caldav/caldav/issues/817, https://github.com/python-caldav/caldav/pull/820Your coding agent can read these notes before it upgrades. Set up the MCP server →
v3.7.0 without the niquests dependency; install requests and/or httpx2 alongside it.
v3.7.0 without the niquests dependency; install requests and/or httpx2 alongside it.
I apologize for the 3.6.0 release coming so shortly after the 3.5.0 release; it is fuelled by demands from the calendaring-sync and calendaring projec
v3.6.0
I apologize for the 3.6.0 release coming so shortly after the 3.5.0 release; it is fuelled by demands from the calendaring-sync and calendaring projects. If you're doing packaging or maintaining dependencies and find bumping the version costly, then wait two weeks - maybe there will be a 3.7.0 release.
The configuration file is now read through the new calendaring-config package, shared with plann, so the two read the same file the same way - with new features like password_command, keyring lookups and per-key environment overrides. save(no_overwrite=True) and save(no_create=True) now leave the check to the server through wildcard preconditions (If-None-Match: *, If-Match: *), closing a race with other clients. Calendar objects keep the raw data as the server sent it (raw_data), and a single occurrence can be cancelled with cancel(). More server profiles have been checked and updated.
Also released without the niquests dependency as 3.6.0a0 - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
I apologize for the 3.6.0 release coming so shortly after the 3.5.0 release; it is fuelled by demands from the calendaring-sync and calendaring projects. If you're doing packaging or maintaining dependencies and find bumping the version costly, then wait two weeks - maybe there will be a 3.7.0 release.
The configuration file is now read through the new calendaring-config package, shared with plann, so the two read the same file the same way - with new features like password_command, keyring lookups and per-key environment overrides. save(no_overwrite=True) and save(no_create=True) now leave the check to the server through wildcard preconditions (If-None-Match: *, If-Match: *), closing a race with other clients. Calendar objects keep the raw data as the server sent it (raw_data), and a single occurrence can be cancelled with cancel(). More server profiles have been checked and updated.
Also released without the niquests dependency as 3.6.0a1 (a0 got messed up - sorry!) - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
!!python/object/apply: in a config file could run arbitrary Python code when get_davclient() or get_calendars() read it - also from the system-wide /etc/calendar.conf. A config file using such tags is now refused with a ValueError; plain YAML and JSON files are unaffected. https://github.com/python-caldav/caldav/pull/785password_command key runs a program named in the config file, so a config file is, by design, able to run code. It is guarded where the YAML tags were not: the command is only run if the file it comes from is owned by the user or by root and is not writable by group or others, and it must be given as a list of the program and its arguments, never through a shell. A config file written by someone else, or one others can write to, should not be trusted for the same reason as before. https://github.com/python-caldav/caldav/pull/804These are bug fixes or improvements, but code or configuration relying on the old behaviour may notice them.
contains that matches nothing gives a warning.* now excludes meta-sections.inherits naming a missing section or a parent of another kind (a caldav_* section inheriting from a kind: jmap one), or a cycle of inherits, raises an error (they used to be ignored, merged in, or recurse forever).contains and disable, and config_section() leaves inherits out of the section it returns.save(no_overwrite=True) and save(no_create=True) (and add_event(..., no_overwrite=True) and friends) may now overwrite an existing object, create a missing one or refuse a legitimate update, unless the server is configured with its features (e.g. features: sogo), or save.if-none-match and save-load.mutable.if-match-wildcard are marked correctly in a hand-written feature list. See "Changed" below, https://github.com/python-caldav/caldav/pull/802DAVClient.password is now the str that was passed in, as on AsyncDAVClient; it used to be encoded to UTF-8 bytes. The return type of Calendar.multiget() is annotated as a list, or a coroutine of one for an async client, like search(). https://github.com/python-caldav/caldav/issues/799, https://github.com/python-caldav/caldav/pull/807cancel() marks an object, or a single occurrence from search(..., expand=True), as STATUS:CANCELLED and saves it - for an occurrence that was planned but will not take place. A new compatibility feature, save-load.event.recurrences.exception.cancelled, records that Zimbra turns a cancelled occurrence into an EXDATE. https://github.com/python-caldav/caldav/issues/598, https://github.com/python-caldav/caldav/pull/810vcal.fix() or any other normalisation, in the new read-only raw_data attribute (bytes; None for objects not read from a server, copies, and after save()). After load() it is the GET response body byte for byte; from a REPORT (search(), multiget()) it is the text of the calendar-data element, with XML entities decoded and line breaks turned into LF. save(raw_data=...) sends the given (UTF-8) bytes as the PUT body unchanged - no vcal.fix(), no re-serialisation, no SEQUENCE bump - still with If-Match / If-Schedule-Tag-Match. This lets sync tools compare and copy what servers store. https://github.com/python-caldav/caldav/issues/763, https://github.com/python-caldav/caldav/pull/803DAVError and its subclasses have a new status attribute with the HTTP status code of the failed response (or None), so an AuthorizationError tells a 401 (bad or missing credentials) from a 403 (authenticated, but not allowed). https://github.com/python-caldav/caldav/issues/805, https://github.com/python-caldav/caldav/pull/807The config file is now read through the calendaring-config package, which the file's other users (plann, calendaring) share; see https://github.com/python-caldav/caldav/issues/786 and https://github.com/python-caldav/caldav/pull/804. This is a new dependency, calendaring-config>=0.5 (it depends only on PyYAML), which matters to packagers. New in the format:
~/.config/pycal/calendar.yaml is searched first, before the old paths.kind: caldav and drop the caldav_ prefix. Sections of other kinds (kind: jmap, a directory of .ics files) are skipped.password_command runs a program for the password, and password_keyring looks it up in the system keyring (this needs the keyring package, e.g. pip install calendaring-config[keyring]).CALDAV_* environment variables override the section's keys one by one: a CALDAV_PASSWORD alone no longer makes caldav ignore the config file (https://github.com/python-caldav/caldav/issues/780). true/false in a variable is a boolean now, and CALDAV_HEADERS is read as JSON.extract_conn_params_from_section(), which plann uses, reads the new format too; pass it the config file's path as config_file to let a password_command run, and the section's name as section_name for error messages.x_* and extra_config are reserved for applications.Compatibility features save-load.todo.uncomplete (a completed task can be made pending again with Todo.uncomplete(); GMX keeps it completed) and search.time-range.todo.no-dtstart.no-due (a date search finds a task with neither DTSTART nor DUE, as RFC 4791 section 9.9 says it should; Zimbra does not). They replace the last two old-style flags in the Zimbra and GMX profiles. https://github.com/python-caldav/caldav/issues/585, https://github.com/python-caldav/caldav/pull/811
Several server profiles in compatibility_hints are updated from caldav-server-tester runs, so with features: <server> configured, is_supported() may give a different answer for the features named here. https://github.com/python-caldav/caldav/pull/781, https://github.com/python-caldav/caldav/pull/812
calendar-color (a hex value) and calendar-order are measured instead of left at the default fragile: both are full, and colour names work too, for Xandikos, Nextcloud (and so ecloud, which inherits its profile), CCS, Stalwart, Cyrus, Posteo, Purelymail and Robur; Bedework 3 stores both colour forms but not calendar-order; SOGo takes a hex colour but not a colour name; OX App Suite takes a hex colour, ignores colour names, and does not store calendar-order.sync-token.invalid-token, sync-token.limit and sync-token.limit.initial-sync, and Bedework 5 the two limit features, where they used to inherit fragile from sync-token or default to full. DAViCal and SOGo ignore DAV:limit and answer a never-issued sync token with a 207 and no error. Bedework 3 refuses a token it never issued, as it should, and answers a DAV:limit with a 500. Bedework 5 cuts the reply at DAV:limit without the 507 the RFC asks for: following the tokens loses nothing, but a client takes the cut reply as complete and gets the rest only on its next sync.scheduling is full (it was unknown), with scheduling.schedule-tag unsupported; inbox delivery and auto-scheduling stay unknown.search.is-not-defined, search.time-range.event and search.time-range.todo are full again (they were fragile).search.time-range.todo.no-dtstart.no-due is unsupported.search.recurrences.includes-implicit.infinite-scope is fragile (it was full): it failed in one run and passed in the next.synchronous-write.delete-calendar) is raised from 12 to 20 seconds; a deleted calendar could still be there after 12.well-known: unsupported for Posteo, full for Robur.calendar-color is now about a hex value such as #FF0000FF, the format clients use in practice. Setting the colour by name (blue) is the new calendar-color.name; a server that rejects or ignores colour names is unsupported there, not broken. Zimbra, SOGo, iCloud and OX App Suite are therefore full for calendar-color and unsupported for calendar-color.name. For Synology, Purelymail, GMX and Infomaniak only colour names were measured, so their hex support is assumed. calendar-color.hex is deprecated: a configuration setting it still works and gives a DeprecationWarning, and its calendar-color is then read as calendar-color.name. https://github.com/python-caldav/caldav/pull/813
save(no_overwrite=True) and save(no_create=True) (and add_event(..., no_overwrite=True) and friends) now send If-None-Match: * and If-Match: *, so on an RFC-compliant server the flag is enforced at the same URL in the same request as the write, and another client can no longer slip in between the check and the PUT. Against a server that does not honour the wildcard preconditions, an existing object may be overwritten, a missing one created, or a legitimate update refused (see "Potentially breaking changes" above). Servers known not to honour them, as of this release:
If-None-Match: *: SOGo, ZimbraIf-Match: *: Bedework, GMX, iCloud, Posteo, Radicale, SOGo, Yahoo, ZimbraA refusal still raises ConsistencyError. A subclass overriding _create() or _put() (or their async variants) must accept a new wildcard parameter after precondition. https://github.com/python-caldav/caldav/pull/802
When save(no_overwrite=True) or save(no_create=True) is refused because another object (at another URL) holds the UID, the error is now the new UidConflictConsistencyError, which is both a UidConflictError and a ConsistencyError, whether the server refused the UID or caldav's own UID search found it. https://github.com/python-caldav/caldav/issues/806, https://github.com/python-caldav/caldav/pull/802, https://github.com/python-caldav/caldav/pull/807
test_ are now reserved for test tooling, so other programs sharing the config file can drop them. A section is marked for testing with test_allowed: true rather than testing_allowed: true, and the order test servers are tried in is set with test_priority rather than priority. The old names still work, but emit a DeprecationWarning. test_priority (or priority) in a section of the main config file was ignored before; it is now honoured. https://github.com/python-caldav/caldav/issues/786, https://github.com/python-caldav/caldav/pull/804FeatureSet.copyFeatureSet() in caldav.compatibility_hints has been renamed to copy_feature_set(), in line with the naming of the other methods. The old name still works but emits a DeprecationWarning. https://github.com/python-caldav/caldav/pull/790caldav.compatibility_hints.incompatibility_description, and the old_flags key in a feature set. They were only ever used by the test suite to skip or adjust tests, and every flag still in use is now a compatibility feature. https://github.com/python-caldav/caldav/issues/585, https://github.com/python-caldav/caldav/pull/811complete(handle_rrule=True) on a recurring task with fixed times (BY* parts in the RRULE, e.g. FREQ=YEARLY;BYMONTH=4,9) did not advance the task when it was completed before its DTSTART: the next occurrence was looked for after the completion time, which found the occurrence just completed. It is now looked for after DTSTART. https://github.com/python-caldav/caldav/issues/782, https://github.com/python-caldav/caldav/pull/808aio.get_calendars() ignored meta-sections, * and glob patterns in config_section, as well as the calendar_name and calendar_url filters of a config section. It now finds the same calendars as the sync get_calendars(), and behaves like it on errors too: it no longer sends an OPTIONS probe first, so an unreachable server raises the error from the principal lookup rather than a DAVError saying "Failed to connect", and with raise_errors=False such an error is logged and the server skipped rather than raised. https://github.com/python-caldav/caldav/issues/793, https://github.com/python-caldav/caldav/pull/800AsyncDAVClient failed with an ImportError when only an httpx-family library was installed. It works now; RFC 6764 discovery still needs niquests or requests, and is skipped with a warning without them. aio.get_davclient() and aio.get_calendars() blocked the event loop while reading the config file and doing RFC 6764 discovery; they now do both in a worker thread. https://github.com/python-caldav/caldav/issues/794, https://github.com/python-caldav/caldav/pull/800supported-report-set and current-user-privilege-set properties from propfind() were the raw lxml element. They are now lists of the report and privilege names in Clark notation, e.g. ["{urn:ietf:params:xml:ns:caldav}calendar-query", "{DAV:}sync-collection"]. Code that walked the returned element has to read the list instead. https://github.com/python-caldav/caldav/issues/795, https://github.com/python-caldav/caldav/pull/807caldav.testing: RadicaleServer ignored its configured port, so Radicale always listened on 5232 and any other port timed out at startup. RadicaleServer.stop() now closes both ends of its shutdown socketpair, and XandikosServer.stop() closes its event loop, so neither leaves a ResourceWarning behind. https://github.com/python-caldav/caldav/issues/797, https://github.com/python-caldav/caldav/pull/800200 OK reply to the PUT of save() is now taken as success (RFC 9110 section 9.3.4 allows it for an overwrite). Before, it was retried, and the retry raised PutError when the server answered 200 again. https://github.com/python-caldav/caldav/pull/802.id returned only the first line. As a result save(no_create=True) of such an existing object raised ConsistencyError, save(no_overwrite=True) overwrote it instead of raising, and save(increase_seqno=False, only_this_recurrence=False) wrote the cut UID back to the server. .id now returns the whole UID, and a UID with a backslash escape such as \, is unescaped there too. https://github.com/python-caldav/caldav/pull/787v3.6.0a1 - 3.6.0 without the hard niquests dependency (2nd attempt)
v3.6.0a1 - 3.6.0 without the hard niquests dependency (2nd attempt)
Nothing published for this version
Yet another release primarily focusing on bugfixes and compatibility. iCloud has now been tested and got its compatibility profile in compatibility_hi
Yet another release primarily focusing on bugfixes and compatibility. iCloud has now been tested and got its compatibility profile in compatibility_hints.py. Test runs towards GMX, Posteo and Purelymail have been skipped for the last few releases; with 3.5.0 the tests pass towards those. More work on getting synchronization right, and on avoiding overwriting changes when multiple clients update the same object.
Also released without the niquests dependency as 3.5.0a0.
Yet another release primarily focusing on bugfixes and compatibility. iCloud has now been tested and got its compatibility profile in compatibility_hints.py. Test runs towards GMX, Posteo and Purelymail have been skipped for the last few releases; with 3.5.0 the tests pass towards those. More work on getting synchronization right, and on avoiding overwriting changes when multiple clients update the same object.
Also released without the niquests dependency as 3.5.0a0 - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - a 100 kB icalendar fragment was measured to take 20 s. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. https://github.com/python-caldav/caldav/security/advisories/GHSA-5h4q-xm57-3mh5 Also fixed in 3.4.1 and 3.3.2.These are bug fixes, but code relying on the old behaviour may notice them.
get_calendars() raises NotFoundError or PropfindError when the server answers the PROPFIND for the calendar home or the calendar list with an error. Earlier it would return an empty list. Transient errors may happen with any server. The empty list could not be told apart from an account without calendars, and a Home Assistant user was reporting that their calendars would sometimes "disappear". Code that relied on getting an empty list on such errors must now catch the exception; 2.x raised as well. NotFoundError is raised for a 404, PropfindError otherwise, and the same goes for CalendarSet.get_calendars(). https://github.com/python-caldav/caldav/issues/741 https://github.com/python-caldav/caldav/pull/742date_search()) filters the result client-side by default and drops objects the server returned outside the range. This affects every server, for users not in UTC: CalDAV servers compare all-day events and floating times as UTC, so a search in another time zone missed all-day events at the edges of the range and returned some from the neighbour days (reported on Baïkal). The server is now asked for one extra day on each side (also for alarm searches and server-side expansion), and the exact cut is made client-side: with a timezone-aware start/end, all-day events and floating times are matched in the time zone of the search, not in that of the Python process. A search may therefore return fewer objects than before, and a plain date as start/end now means a day in UTC, also for matching all-day events (previously, client-side, a day in the time zone of the Python process). Pass post_filter=False or compatibility_workarounds=False to send the range as given and get what the server returned. https://github.com/python-caldav/caldav/issues/545 https://github.com/python-caldav/caldav/pull/758save() on an object loaded through search() or multiget() sends If-Match (or If-Schedule-Tag-Match) and raises ETagMismatchError (or ScheduleTagMismatchError) if someone else changed the object since it was loaded. This affects every server that returns ETags, i.e. nearly all. Previously no ETag was requested in searches, so such a save silently overwrote the other client's change. Code that saves search results must now be prepared to reload the object and retry. (Servers sending only weak ETags, like GMX, still get an unconditional save.) https://github.com/python-caldav/caldav/pull/751DAV:valid-sync-token - or naming none, on a server configured with full sync-token support (with no features configured, or with sync-token support set to fragile, such a 401/403 still falls back) - is raised instead of silently falling back to a full fetch. An expired sync token (RFC 6578 section 3.2) could not be told apart from a permission error, so a real permission problem was hidden behind an expensive full fetch. An expired token (also Xandikos' 412) and an unsupported sync-collection report (Zimbra) still lead to the fallback. https://github.com/python-caldav/caldav/issues/738 https://github.com/python-caldav/caldav/issues/756 https://github.com/python-caldav/caldav/pull/748 https://github.com/python-caldav/caldav/pull/759FeatureSet.is_supported() gave inverted answers for server observations (e.g. get-current-user-principal.has-calendar) and client features (e.g. rate-limit) when asked for a bool. This concerns code querying the compatibility hints directly, not any particular server; code that compensated for the inverted answers will now be wrong. Asking for a server-peculiarity, tests-behaviour or client-hints feature as a bool now raises TypeError, as no meaningful bool exists for those. https://github.com/python-caldav/caldav/pull/732SynchronizableCalendarObjectCollection.deleted_urls: the URLs of the members a sync-collection report listed as removed (RFC 6578 section 3.2). They are still among the returned objects, as before, but a caller no longer has to guess from a missing ETag, and sync() no longer fetches each removed object to find out. The set is empty after the full-retrieval fallback, which reports no removals. https://github.com/pycalendar/calendaring-sync/pull/19#issuecomment-6112378889 https://github.com/python-caldav/caldav/pull/760delete(if_match=...) on events, todos and journals: with if_match=True the DELETE carries the same precondition save() sends (If-Schedule-Tag-Match if a Schedule-Tag is cached, else If-Match with the cached ETag); a string is sent as If-Match. A 412 raises ScheduleTagMismatchError / ETagMismatchError, and a 404 raises NotFoundError instead of counting as success. Plain delete() is unchanged. DAVClient.delete() takes a headers argument, like AsyncDAVClient.delete() already did. https://github.com/python-caldav/caldav/issues/740 https://github.com/python-caldav/caldav/pull/747save(precondition="etag") and delete(if_match=True, precondition="etag") prefer If-Match with the cached ETag over a cached Schedule-Tag, so a 412 raises ETagMismatchError when anything changed, also an attendee's reply. Under If-Schedule-Tag-Match, which the default "auto" still prefers, the server merges such a reply into the write (RFC 6638 section 3.2.10), and a sync client was never told its copy was stale. With no strong ETag cached, "etag" falls back to the Schedule-Tag. https://github.com/python-caldav/caldav/issues/762 https://github.com/python-caldav/caldav/pull/764add_property_filter() passes the != (alias <>), !contains and def operators of icalendar-searcher 1.1.0 on to the search. They are decided client-side (unless post_filter=False): the server query leaves them out, as no server has been probed for negate-condition support yet. build_search_xml_query() renders !contains as a negated text-match, and != and def as a bare prop-filter - a negated text-match is a negated substring match, so it cannot express !=. https://github.com/python-caldav/caldav/issues/568 https://github.com/python-caldav/caldav/pull/750features="icloud" profile, from a caldav-server-tester run by a user - the documentation already referred to it, but it did not exist. https://github.com/python-caldav/caldav/issues/730 https://github.com/python-caldav/caldav/pull/733sync-token.invalid-token: whether a sync token the server never issued is refused with DAV:valid-sync-token as RFC 6578 section 3.2 says. Xandikos and CCS answer some such tokens with a 500, and Stalwart, Ox and Purelymail with a report and no error. https://github.com/jelmer/xandikos/issues/743 https://github.com/python-caldav/caldav/pull/752sync-token.limit and sync-token.limit.initial-sync, for DAV:limit and the checkpoint tokens of a truncated sync-collection report (RFC 6578 sections 3.6 and 3.7). Hints for Stalwart, Xandikos, Radicale, Baïkal, Davis, Nextcloud, CCS and Infomaniak. https://github.com/python-caldav/caldav/pull/754 https://github.com/python-caldav/caldav/pull/770propfind.principal-depth-1: whether a Depth: 1 PROPFIND on the principal URL works. GMX answers it with a 400. https://github.com/python-caldav/caldav/pull/755save-load.event.no-dtend: whether a VEVENT with neither DTEND nor DURATION is stored, as RFC 5545 section 3.6.1 allows. iCloud refuses one with a 404. https://github.com/python-caldav/caldav-server-tester/issues/24 https://github.com/python-caldav/caldav/pull/772search-cache takes a filtered-only key, saying only searches with a time range or a property filter come from the lagging cache while a plain listing is up to date at once. The library itself ignores it; the integration tests and the caldav-server-tester wait less where it is set. Set for Purelymail. https://github.com/python-caldav/caldav/pull/775calendar-home-set, Principal.calendar(cal_id=...), Principal.make_calendar() and their async twins resolved against the client URL, while get_calendars() looks below the principal URL. They now use the principal URL as the calendar home too. https://github.com/python-caldav/caldav/issues/749 https://github.com/python-caldav/caldav/pull/755get_calendars() returned an empty list when the client URL points directly at a calendar on a server that advertises no calendar-home-set and keeps no calendars below the principal, such as a Nextcloud public calendar share (/remote.php/dav/public-calendars/<token>, principal /principals/system/public/). Without a calendar-home-set, the principal URL is still tried first (GMX); if it holds no calendars, the client URL is tried as well, as in 2.x. An error or a 401/403 on the client URL then means no calendars rather than an exception. Regression since 3.0. https://github.com/python-caldav/caldav/pull/744ValueError: ... can't be joined with ... once the client had moved to the account's pNN-caldav.icloud.com host, on calendars found before the move. Also, a configured url.encode-at.* feature was lost at the move. https://github.com/python-caldav/caldav/issues/730 https://github.com/python-caldav/caldav/pull/733datetime.min or datetime.max (e.g. as the open end of a search) raised OverflowError in time zones behind UTC (e.g. the Americas). It now converts, and a time that UTC cannot hold is clamped to the earliest or latest UTC time. A timezone-aware datetime within a day of datetime.min or datetime.max is now converted from its own time zone rather than from the local one. https://github.com/python-caldav/caldav/pull/758datetime.min) sent an invalid date, such as 10101T000000Z for year 1: the year was not zero-padded to four digits. https://github.com/python-caldav/caldav/pull/758SynchronizableCalendarObjectCollection.sync() no longer returns objects the collection never held as deleted. Nextcloud reports a trashed object as removed when it purges it, e.g. because an object with the same UID is added again. https://github.com/python-caldav/caldav/pull/767Calendar.get_objects_by_sync_token() (and so objects() and SynchronizableCalendarObjectCollection.sync()) threw away a truncated sync-collection reply - RFC 6578 section 3.6, a 507 response for the collection itself - and silently fell back to fetching the whole calendar. It now keeps the members and the new token, and repeats the REPORT with that token until the reply is complete, at most Calendar.sync_max_pages (100) times. If the server stops early or keeps truncating, the returned collection has truncated set. So does a truncated initial sync on a server whose checkpoint token would skip the remaining objects (sync-token.limit.initial-sync broken, Stalwart: it truncates every report at its maxResults setting, default 2000). SyncCollectionResult.truncated and DAVResponse.sync_truncated report a truncated page to callers of the lower-level API. https://github.com/python-caldav/caldav/issues/737 https://github.com/python-caldav/caldav/pull/745AsyncDAVClient.sync_collection() raised AttributeError on every reply with a body, as it assigned to the read-only DAVResponse.sync_token. https://github.com/python-caldav/caldav/pull/745save() whose response carried none - common, since RFC 4791 section 5.3.4 forbids a strong ETag when the server altered the data - so the next save() sent a stale If-Match and raised ETagMismatchError. The stale tag is now dropped. https://github.com/python-caldav/caldav/pull/751W/"...") was sent as If-Match, which can never match since If-Match compares strongly (RFC 9110 section 13.1.1); every save() after an add_event() raised ETagMismatchError on servers answering a PUT with a weak ETag (seen on GMX). A weak ETag is no longer sent, so such an update goes out unconditionally, and delete(if_match=True) with only a weak ETag cached raises ValueError. https://github.com/python-caldav/caldav/pull/751obj.etag returned an element, and lxml raised a FutureWarning when it was checked. https://github.com/python-caldav/caldav/pull/751save() refused because another object in the calendar holds the UID (CALDAV:no-uid-conflict, RFC 4791 section 5.3.2.1, or CALDAV:unique-scheduling-object-resource, RFC 6638 section 3.2.4.1) now raises the new UidConflictError, a PutError. Previously a 412 (Xandikos, Stalwart) on a save carrying If-Match raised ETagMismatchError, so "the UID is taken" looked like "someone changed the object"; and a 409 (Radicale) was retried once. Where earlier versions raised ETagMismatchError, ScheduleTagMismatchError or AuthorizationError (a 403 from Cyrus), the UidConflictError is a subclass of that as well, so existing handlers keep working. https://github.com/python-caldav/caldav/issues/756 https://github.com/python-caldav/caldav/pull/759DAVError (AuthorizationError, ReportError, PutError, ETagMismatchError, ...) raised for a failed response now carries body and preconditions, the latter listing the elements of a DAV:error body, e.g. ["{DAV:}valid-sync-token"], whatever the status. For the effect on sync, see "Potentially breaking changes" above. https://github.com/python-caldav/caldav/issues/738 https://github.com/python-caldav/caldav/issues/756 https://github.com/python-caldav/caldav/pull/748 https://github.com/python-caldav/caldav/pull/759AuthorizationError for a 401/403 whose body claimed to be XML but was not (e.g. an HTML error page sent as application/xml). It now handles 401/403 like the sync client. https://github.com/python-caldav/caldav/pull/748SEQUENCE handling on the save paths - https://github.com/python-caldav/caldav/issues/739 https://github.com/python-caldav/caldav/pull/746:
add_object(), add_event(), add_todo(), add_journal() (and the deprecated save_*() aliases) took increase_seqno as an iCalendar property: it did not reach save(), so SEQUENCE was bumped anyway, and the bogus property was written to the object. It is now passed through, and save_with_invites() accepts it too.SEQUENCE rather than the override's. The override is now bumped (an override without SEQUENCE gets the master's plus one) and the master left alone (with all_recurrences=True the master is still bumped).SEQUENCE on the attendee's copy. Only the organizer revises an event; replies no longer bump it.Todo.complete(handle_rrule=True, rrule_mode="this_and_future") raised AttributeError; only the undeclared "thisandfuture" worked. Both spellings are now accepted. Fix by @muratatar06 in https://github.com/python-caldav/caldav/pull/736 https://github.com/python-caldav/caldav/issues/735Todo.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/746RRULE 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/746change_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/734CATEGORIES: 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/773vcal.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/773compatibility_hints: the inverted FeatureSet.is_supported() answers (see "Potentially breaking changes" above) came from how the features were stored. An observation is now stored as {"value": <bool>} - set_feature(observation, False) writes {"value": False} rather than {"support": "unsupported"} - and read back as that; the legacy observed key and support levels are still understood. A client-feature reads as its enable flag, and a bool given for one is stored as {"enable": <bool>}. Asked for as a str, both spell the bool out ("True"/"False"). The Radicale, DAViCal and Davis profiles declare that a fresh account has no calendar. https://github.com/python-caldav/caldav/pull/732["{DAV:}valid-sync-token"] , whatever the status. For the effect on sync, see "Potentially breaking changes" above. #738 #756 #748 #759
caldav v3.5.0a0 - v3.5.0 without the niquests dependency
Yet another release primarily focusing on bugfixes and compatibility. iCloud has now been tested and got its compatibility profile in compatibility_hints.py. Test runs towards GMX, Posteo and Purelymail have been skipped for the last few releases; with 3.5.0 the tests pass towards those. More work on getting synchronization right, and on avoiding overwriting changes when multiple clients update the same object.
Also released without the niquests dependency as 3.5.0a0.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - a 100 kB icalendar fragment was measured to take 20 s. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. GHSA-5h4q-xm57-3mh5 Also fixed in 3.4.1 and 3.3.2.These are bug fixes, but code relying on the old behaviour may notice them.
get_calendars() raises NotFoundError or PropfindError when the server answers the PROPFIND for the calendar home or the calendar list with an error. Earlier it would return an empty list. Transient errors may happen with any server. The empty list could not be told apart from an account without calendars, and a Home Assistant user was reporting that their calendars would sometimes "disappear". Code that relied on getting an empty list on such errors must now catch the exception; 2.x raised as well. NotFoundError is raised for a 404, PropfindError otherwise, and the same goes for CalendarSet.get_calendars(). #741 #742date_search()) filters the result client-side by default and drops objects the server returned outside the range. This affects every server, for users not in UTC: CalDAV servers compare all-day events and floating times as UTC, so a search in another time zone missed all-day events at the edges of the range and returned some from the neighbour days (reported on Baïkal). The server is now asked for one extra day on each side (also for alarm searches and server-side expansion), and the exact cut is made client-side: with a timezone-aware start/end, all-day events and floating times are matched in the time zone of the search, not in that of the Python process. A search may therefore return fewer objects than before, and a plain date as start/end now means a day in UTC, also for matching all-day events (previously, client-side, a day in the time zone of the Python process). Pass post_filter=False or compatibility_workarounds=False to send the range as given and get what the server returned. #545 #758save() on an object loaded through search() or multiget() sends If-Match (or If-Schedule-Tag-Match) and raises ETagMismatchError (or ScheduleTagMismatchError) if someone else changed the object since it was loaded. This affects every server that returns ETags, i.e. nearly all. Previously no ETag was requested in searches, so such a save silently overwrote the other client's change. Code that saves search results must now be prepared to reload the object and retry. (Servers sending only weak ETags, like GMX, still get an unconditional save.) #751DAV:valid-sync-token - or naming none, on a server configured with full sync-token support (not with no features configured, or fragile) - is raised instead of silently falling back to a full fetch. An expired sync token (RFC 6578 section 3.2) could not be told apart from a permission error, so a real permission problem was hidden behind an expensive full fetch. An expired token (also Xandikos' 412) and an unsupported sync-collection report (Zimbra) still lead to the fallback. #738 #756 #748 #759FeatureSet.is_supported() gave inverted answers for server observations (e.g. get-current-user-principal.has-calendar) and client features (e.g. rate-limit) when asked for a bool. This concerns code querying the compatibility hints directly, not any particular server; code that compensated for the inverted answers will now be wrong. Asking for a server-peculiarity, tests-behaviour or client-hints feature as a bool now raises TypeError, as no meaningful bool exists for those. #732SynchronizableCalendarObjectCollection.deleted_urls: the URLs of the members a sync-collection report listed as removed (RFC 6578 section 3.2). They are still among the returned objects, as before, but a caller no longer has to guess from a missing ETag, and sync() no longer fetches each removed object to find out. The set is empty after the full-retrieval fallback, which reports no removals. PyCalendar/calendaring-sync#19 (comment)delete(if_match=...) on events, todos and journals: with if_match=True the DELETE carries the same precondition save() sends (If-Schedule-Tag-Match if a Schedule-Tag is cached, else If-Match with the cached ETag); a string is sent as If-Match. A 412 raises ScheduleTagMismatchError / ETagMismatchError, and a 404 raises NotFoundError instead of counting as success. Plain delete() is unchanged. DAVClient.delete() takes a headers argument, like AsyncDAVClient.delete() already did. #740 #747save(precondition="etag") and delete(if_match=True, precondition="etag") prefer If-Match with the cached ETag over a cached Schedule-Tag, so a 412 raises ETagMismatchError when anything changed, also an attendee's reply. Under If-Schedule-Tag-Match, which the default "auto" still prefers, the server merges such a reply into the write (RFC 6638 section 3.2.10), and a sync client was never told its copy was stale. With no strong ETag cached, "etag" falls back to the Schedule-Tag. #762 #764add_property_filter() passes the != (alias <>), !contains and def operators of icalendar-searcher 1.1.0 on to the search. They are decided client-side (unless post_filter=False): the server query leaves them out, as no server has been probed for negate-condition support yet. build_search_xml_query() renders !contains as a negated text-match, and != and def as a bare prop-filter - a negated text-match is a negated substring match, so it cannot express !=. #568 #750features="icloud" profile, from a caldav-server-tester run by a user - the documentation already referred to it, but it did not exist. #730 #733sync-token.invalid-token: whether a sync token the server never issued is refused with DAV:valid-sync-token as RFC 6578 section 3.2 says. Xandikos and CCS answer some such tokens with a 500, and Stalwart, Ox and Purelymail with a report and no error. jelmer/xandikos#743 #752sync-token.limit and sync-token.limit.initial-sync, for DAV:limit and the checkpoint tokens of a truncated sync-collection report (RFC 6578 sections 3.6 and 3.7). Hints for Stalwart, Xandikos, Radicale, Baïkal, Davis, Nextcloud, CCS and Infomaniak. #754 #770propfind.principal-depth-1: whether a Depth: 1 PROPFIND on the principal URL works. GMX answers it with a 400. #755save-load.event.no-dtend: whether a VEVENT with neither DTEND nor DURATION is stored, as RFC 5545 section 3.6.1 allows. iCloud refuses one with a 404. python-caldav/caldav-server-tester#24 #772search-cache takes a filtered-only key, saying only searches with a time range or a property filter come from the lagging cache while a plain listing is up to date at once. The library itself ignores it; the integration tests and the caldav-server-tester wait less where it is set. Set for Purelymail. #775calendar-home-set, Principal.calendar(cal_id=...), Principal.make_calendar() and their async twins resolved against the client URL, while get_calendars() looks below the principal URL. They now use the principal URL as the calendar home too. #749 #755get_calendars() returned an empty list when the client URL points directly at a calendar on a server that advertises no calendar-home-set and keeps no calendars below the principal, such as a Nextcloud public calendar share (/remote.php/dav/public-calendars/<token>, principal /principals/system/public/). Without a calendar-home-set, the principal URL is still tried first (GMX); if it holds no calendars, the client URL is tried as well, as in 2.x. An error or a 401/403 on the client URL then means no calendars rather than an exception. Regression since 3.0. #744ValueError: ... can't be joined with ... once the client had moved to the account's pNN-caldav.icloud.com host, on calendars found before the move. Also, a configured url.encode-at.* feature was lost at the move. #730 #733datetime.min or datetime.max (e.g. as the open end of a search) raised OverflowError in time zones behind UTC (e.g. the Americas). It now converts, and a time that UTC cannot hold is clamped to the earliest or latest UTC time. A timezone-aware datetime within a day of datetime.min or datetime.max is now converted from its own time zone rather than from the local one. #758datetime.min) sent an invalid date, such as 10101T000000Z for year 1: the year was not zero-padded to four digits. #758SynchronizableCalendarObjectCollection.sync() no longer returns objects the collection never held as deleted. Nextcloud reports a trashed object as removed when it purges it, e.g. because an object with the same UID is added again. #767Calendar.get_objects_by_sync_token() (and so objects() and SynchronizableCalendarObjectCollection.sync()) threw away a truncated sync-collection reply - RFC 6578 section 3.6, a 507 response for the collection itself - and silently fell back to fetching the whole calendar. It now keeps the members and the new token, and repeats the REPORT with that token until the reply is complete, at most Calendar.sync_max_pages (100) times. If the server stops early or keeps truncating, the returned collection has truncated set. So does a truncated initial sync on a server whose checkpoint token would skip the remaining objects (sync-token.limit.initial-sync broken, Stalwart: it truncates every report at its maxResults setting, default 2000). SyncCollectionResult.truncated and DAVResponse.sync_truncated report a truncated page to callers of the lower-level API. #737 #745AsyncDAVClient.sync_collection() raised AttributeError on every reply with a body, as it assigned to the read-only DAVResponse.sync_token. #745save() whose response carried none - common, since RFC 4791 section 5.3.4 forbids a strong ETag when the server altered the data - so the next save() sent a stale If-Match and raised ETagMismatchError. The stale tag is now dropped. #751W/"...") was sent as If-Match, which can never match since If-Match compares strongly (RFC 9110 section 13.1.1); every save() after an add_event() raised ETagMismatchError on servers answering a PUT with a weak ETag (seen on GMX). A weak ETag is no longer sent, so such an update goes out unconditionally, and delete(if_match=True) with only a weak ETag cached raises ValueError. #751obj.etag returned an element, and lxml raised a FutureWarning when it was checked. #751save() refused because another object in the calendar holds the UID (CALDAV:no-uid-conflict, RFC 4791 section 5.3.2.1, or CALDAV:unique-scheduling-object-resource, RFC 6638 section 3.2.4.1) now raises the new UidConflictError, a PutError. Previously a 412 (Xandikos, Stalwart) on a save carrying If-Match raised ETagMismatchError, so "the UID is taken" looked like "someone changed the object"; and a 409 (Radicale) was retried once. Where earlier versions raised ETagMismatchError, ScheduleTagMismatchError or AuthorizationError (a 403 from Cyrus), the UidConflictError is a subclass of that as well, so existing handlers keep working. #756 #759DAVError (AuthorizationError, ReportError, PutError, ETagMismatchError, ...) raised for a failed response now carries body and preconditions, the latter listing the elements of a DAV:error body, e.g. ["{DAV:}valid-sync-token"], whatever the status. For the effect on sync, see "Potentially breaking changes" above. #738 #756 #748 #759AuthorizationError for a 401/403 whose body claimed to be XML but was not (e.g. an HTML error page sent as application/xml). It now handles 401/403 like the sync client. #748SEQUENCE handling on the save paths - #739 #746:
add_object(), add_event(), add_todo(), add_journal() (and the deprecated save_*() aliases) took increase_seqno as an iCalendar property: it did not reach save(), so SEQUENCE was bumped anyway, and the bogus property was written to the object. It is now passed through, and save_with_invites() accepts it too.SEQUENCE rather than the override's. The override is now bumped (an override without SEQUENCE gets the master's plus one) and the master left alone (with all_recurrences=True the master is still bumped).SEQUENCE on the attendee's copy. Only the organizer revises an event; replies no longer bump it.Todo.complete(handle_rrule=True, rrule_mode="this_and_future") raised AttributeError; only the undeclared "thisandfuture" worked. Both spellings are now accepted. Fix by @muratatar06 in #736 #735Todo.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. #746RRULE 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. #746change_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. #678 #734CATEGORIES: 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 collective/icalendar#1722 #773vcal.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. #773compatibility_hints: the inverted FeatureSet.is_supported() answers (see "Potentially breaking changes" above) came from how the features were stored. An observation is now stored as {"value": <bool>} - set_feature(observation, False) writes {"value": False} rather than {"support": "unsupported"} - and read back as that; the legacy observed key and support levels are still understood. A client-feature reads as its enable flag, and a bool given for one is stored as {"enable": <bool>}. Asked for as a str, both spell the bool out ("True"/"False"). The Radicale, DAViCal and Davis profiles declare that a fresh account has no calendar. #732Security release: 3.4.0 with only the fix below. Also released without the niquests dependency as 3.4.1a0.
caldav v3.4.1
Security release: 3.4.0 with only the fix below. Also released without the niquests dependency as 3.4.1a0.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - 100 kB took more than 20 s, so a hostile server or a shared calendar could stall the client. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. https://github.com/python-caldav/caldav/security/advisories/GHSA-5h4q-xm57-3mh5 Also fixed in 3.5.0 and 3.3.2.Security release: 3.4.0 with only the fix below. Also released without the niquests dependency as 3.4.1a0 - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - a 100 kB icalendar fragment was measured to take 20 s. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. https://github.com/python-caldav/caldav/security/advisories/GHSA-5h4q-xm57-3mh5 Also fixed in 3.5.0 and 3.3.2.Security release: 3.4.0 with only the fix below. Also released without the niquests dependency as 3.4.1a0.
caldav v3.4.1a0 - v3.4.1 without the niquests dependency
Security release: 3.4.0 with only the fix below. Also released without the niquests dependency as 3.4.1a0.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - 100 kB took more than 20 s, so a hostile server or a shared calendar could stall the client. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. GHSA-5h4q-xm57-3mh5 Also fixed in 3.5.0 and 3.3.2.There may be BREAKING CHANGES for people using the JMAP support, and in some use-case scenarios when using the library towards a non-compliant server…
WWW-Authenticate header.features='infomaniak' there will be a sleep-probe-loop ensuring methods for calendar creation, deletion and PROPPATCH will only return after the changes have become visible.search(expand=True) (a regression in 3.3.0), component-type filtering and UID lookups.There may be BREAKING CHANGES for people using the JMAP support, and in some use-case scenarios when using the library towards a non-compliant server without flagging it in the config. Read the CHANGELOG for details.
The main things in this release:
caldav.jmap is now a deprecated re-export of it, available through the caldav[jmap] extra.WWW-Authenticate header.features='infomaniak' there will be a sleep-probe-loop ensuring methods for calendar creation, deletion and PROPPATCH will only return after the changes have become visible.search(expand=True) (a regression in 3.3.0), component-type filtering and UID lookups.Calendar.get_object_by_uid() had two bugs causing it (under some circumstances) to fetch the whole calendar to search for a UID on a perfectly compliant server. This is unacceptably expensive in some scenarios and has been fixed - at the cost of breaking support for some non-compliant servers. The method is used internally, so this matters. The mitigation is to specify server capabilities through the features-configuration (see above).
The JMAP support was declared experimental in 3.0, hence the changes below are deemed allowable in a minor release:
caldav.jmap no longer works on a plain pip install caldav. The implementation moved to the standalone calendaring-jmap package, which is an optional dependency - install caldav[jmap] (or calendaring-jmap). Importing caldav.jmap without it raises an ImportError saying so.caldav[jmap] brings dependencies caldav itself does not have. calendaring-jmap 1.1.0 requires icalendar>=7.3.0, niquests>=3.21.1 and pyyaml>=6.0.3 (caldav asks only for icalendar>6.0.0 and unpinned niquests and PyYAML, so the extra raises those floors), and it requires requests as well.GPL-3.0-or-later OR Apache-2.0; calendaring-jmap is AGPL-3.0-or-later. The import path is unchanged, so this is easy to miss: if you relied on the Apache-2.0 option, note that the JMAP code you get through caldav[jmap] carries the AGPL network-copyleft obligation. Nothing changes for users of caldav without the jmap extra.caldav.lib.http_sync no longer exports AsyncSession or require_async_session(). They existed only for the async JMAP client, which has moved out of this library; caldav.lib.http_libraries.required_library_error() is kept, but has no caller in caldav today.compatibility_hints: new server profile yahoo, for Yahoo Calendar (https://caldav.calendar.yahoo.com/), probed with caldav-server-tester.compatibility_hints: auth.www-authenticate records whether the server sends the WWW-Authenticate header RFC 7235 §3.1 requires on a 401 (yahoo doesn't), and auth.www-authenticate.usable-scheme whether the schemes it offers include one this library implements.compatibility_hints: new feature scheduling.calendar-user-address-set.populated, for a server that advertises calendar-user-address-set but returns it empty (Xandikos).compatibility_hints: new features synchronous-write.create-calendar, synchronous-write.delete-calendar and synchronous-write.proppatch, for a server that answers MKCALENDAR, DELETE of a calendar or PROPPATCH before the change shows. If a delay is configured, the methods for creating/deleting calendars and changing properties will block until the change is visible.caldav.jmap no longer carries its own JMAP client implementation. It's now a thin re-export of calendaring-jmap.
from caldav.jmap import JMAPClient, from caldav.jmap.error import JMAPAuthError, caldav.jmap.convert.jscal_to_ical and so on all resolve to calendaring-jmap's own modules.caldav.jmap now emits a DeprecationWarning. Use from calendaring_jmap import JMAPClient going forward; the wrapper will be removed in a future release.get_jmap_client()/get_async_jmap_client() still resolve configuration the same way get_davclient() does - that is the one thing the wrapper adds over importing calendaring-jmap directly.DAVError.compatibility_hints.search(start=..., end=..., expand=True) without event=True (or another component type) returned only the first occurrence of a recurring event on DAViCal - a regression in v3.3.0. Passing event=True or compatibility_workarounds=False avoided it. See https://github.com/python-caldav/caldav/issues/722Principal.get_vcal_address() raised IndexError: list index out of range when the server returned an empty calendar-user-address-set. It now falls back to the principal URL, as RFC 6638 §2.4.1 provides for a user with no well-defined calendar user address. add_organizer() and add_attendee() go through the same method, so they were affected too. Seen on Xandikos 0.4.7, which advertises calendar-auto-schedule and serves schedule-inbox/outbox, but leaves the address set empty. change_attendee_status() accepts that same URL back, so an event the library invited a principal to can still have its PARTSTAT changed. A property that is absent still raises NotFoundError; per the same section that means the user is not enabled for scheduling.401 response with no WWW-Authenticate header (Yahoo Calendar) would cause the 401 to surface as AuthorizationError - indistinguishable from a genuinely rejected password. Over TLS, with no auth_type/auth already configured, the client now guesses basic once before giving up. See https://github.com/python-caldav/caldav/issues/713 and https://github.com/python-caldav/caldav/issues/717.search(event=True), search(journal=True) and search(comp_class=...) could return objects of the wrong component type from a server graded search.comp-type: unsupported - one that silently ignores the comp-filter and returns the whole calendar. Only broken triggered client-side filtering. unsupported now does too, keeping the comp-filter in the query. Affected profiles: ox and infomaniak (and yahoo, new in this release). En passant, search(comp_class=Todo) no longer drops completed tasks on servers graded broken (bedework).get_object_by_uid() (and through it add_object() for an object carrying RELATED-TO, get_relatives() and set_relation()) downloaded and parsed the whole calendar when called without comp_class on a server that needs the per-component-type split. Seen as ~4 s per add_object() against a 2500-object calendar on Xandikos.get_object_by_uid() for a UID not on the server also downloaded and parsed the whole calendar before raising NotFoundError: an empty UID search was always retried without the UID filter, in case the server's text search was broken. This can in some situations be a very expensive operation. That retry now depends on the configured features profile. This may be a breaking change for non-compliant servers unless you have configured features correctly.save() on a recurrence instance whose master is missing from the server (an "orphan" RECURRENCE-ID) recursed until RecursionError. The object is now saved as-is.make_calendar() raised KeyError: 'behaviour' on a server whose create-calendar was configured as quirk without a behaviour.add_object() with RELATED-TO properties re-saved the new object once per relation, and saved each related object even when it already pointed back. set_relation() no longer saves when the relation was already there.auth_type and notes that any other connection parameter can be given the same way.Security release: 3.3.1 with only the fix below. Also released without the niquests dependency as 3.3.2a0.
caldav v3.3.2
Security release: 3.3.1 with only the fix below. Also released without the niquests dependency as 3.3.2a0.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - 100 kB took more than 20 s, so a hostile server or a shared calendar could stall the client. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. https://github.com/python-caldav/caldav/security/advisories/GHSA-5h4q-xm57-3mh5 Also fixed in 3.5.0 and 3.4.1.Security release: 3.3.1 with only the fix below. Also released without the niquests dependency as 3.3.2a0 - install requests (for the sync client) and/or httpx2 (for the async client) alongside it.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - a 100 kB icalendar fragment was measured to take 20 s. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. https://github.com/python-caldav/caldav/security/advisories/GHSA-5h4q-xm57-3mh5 Also fixed in 3.5.0 and 3.4.1.Security release: 3.3.1 with only the fix below. Also released without the niquests dependency as 3.3.2a0.
caldav v3.3.2a0 - v3.3.2 without the niquests dependency
Security release: 3.3.1 with only the fix below. Also released without the niquests dependency as 3.3.2a0.
vcal.fix(), run on every iCalendar object fetched from a server, took quadratic time on a long run of blanks or backslashes - 100 kB took more than 20 s, so a hostile server or a shared calendar could stall the client. The regexp has been fixed up and now takes linear time to run; the output is unchanged. Reported by @BrianWillows. GHSA-5h4q-xm57-3mh5 Also fixed in 3.5.0 and 3.4.1.The two main things in this release:
The two main things in this release:
The two main things in this release:
ioggstream/bedework:latest which has been locked towards Bedework 3.10.3 since 2018. Now there is a script for building a bedework container in the docker test servers. The old Bedework docker image has been kept, but renamed into bedework3. Workarounds for various server quirks have been implemented.bedework compatibility profile is renamed bedework_3_10_3, and bedework_5_0_0 is added. features: bedework or base: bedework in a config now raises a ValueError naming both.compatibility_hints: the write-delay server-peculiarity is turned around into the synchronous-write server-feature. While the caldav-server-tester does probe it, the delay (relevant for tests and the caldav server tester) should still be hand-configured.compatibility_hints: new caldav-server-tester probes caused the Xandikos, SOGo, Radicale, OX, Zimbra, Bedework and Cyrus profiles to be regraded. With features: <server> configured, is_supported() may give a different answer than in 3.3.0.make_calendar() raised MkcalendarError when the server answered MKCALENDAR with 207 Multi-Status instead of 201 Created, even though the calendar was created. A multistatus reporting no failure is now accepted (seen on Bedework 5).
An ETag delivered percent-encoded (%22...%22) in a PUT response is now decoded; previously every second save() of an object raised ETagMismatchError (seen on Bedework 5).
Expanded searches lost all but the last occurrence when the server answered with one DAV:response per recurrence instance, all under the same href. The instances are now merged (seen on Bedework 5).
A bare icalendar.Event/Todo/Journal handed to caldav is wrapped in a VCALENDAR - that wrapper no longer gets a random RFC 7986 UID of its own (icalendar.Calendar.new() adds one). Servers taking the calendar-level UID to be the identity of the calendar object resource (i.e. Stalwart) saw a brand new UID on every save and rejected it with 412 no-uid-conflict.
v3.3.1a - niquest-less release mirroring v3.3.1
v3.3.1a - niquest-less release mirroring v3.3.1
3.3.0 is mostly a maintenance and QA release. The major news here is that we've done an AI-based (Claude Fable) review of all the code, this has resul
3.3.0 is mostly a maintenance and QA release. The major news here is that we've done an AI-based (Claude Fable) review of all the code, this has resulted in quite a lot of hammering on the code to get all the issues found smoothened out.
3.3.0a1 is a variant without any http-library in the dependencies - allowing projects that bring their own http-library to pin a caldav-version that does not bring in niquests.
3.3.0 is mostly a maintenance and QA release. The major news here is that we've done an AI-based (Claude Fable) review of all the code, this has resulted in quite a lot of hammering on the code to get all the issues found smoothened out.
3.3.0a1 is a variant without any http-library in the dependencies - allowing projects that bring their own http-library to pin a caldav-version that does not bring in niquests.
The JMAP support has been declared experimental and compatibility_hints.py has been declared unstable, hence the two changes below are deemed allowable in a minor release:
jmap/client.py and jmap/async_client.py get_objects_by_sync_token(): the newState from CalendarEvent/changes was discarded into _, so callers could not chain sync calls without a separate get_sync_token() round-trip — a race window where intervening changes would be silently missed. The method now returns a 4-tuple (added, modified, deleted, new_sync_token) instead of a 3-tuple.compatibility_hints: There has been quite a lot of work refining, calibrating, extending and fixing the compatibility database (and surrounding code). This file is declared unstable for the 3.x release series. The details (wall-of-text) have been omitted. Changes in behaviour may be observed if you have configured your server with features= ...
synologyroburcaldav[niquests] is now a valid install target. Perhaps 4.x will come without any http library in the dependency-list.pip install niquests, or a dependency on caldav[niquests] rather than plain caldav - plus a link to the HTTP Library Configuration documentation. Previously it surfaced as a bare ModuleNotFoundError: No module named 'requests' from somewhere in the import chain. Covers the sync and async CalDAV clients, discovery, caldav.testing and the JMAP clients; the async JMAP client is niquests-only and now says so.JMAPClient and AsyncJMAPClient can be used as (async) context managers, and the session can also be released explicitly with client.close() / await client.aclose().compatibility_hints.pycaldav.config.extract_conn_params_from_section is now public API (renamed from _extract_conn_params_from_section), so that downstream tools like plann can map plann-style config sections (caldav_url, caldav_user, features, etc.) to DAVClient parameters without duplicating the logic.CalendarObjectResource.load(multiget_fallback=True) and Calendar.search(compatibility_workarounds=True). Explicitly set them to False to get more directly to the actual server results.calendar-multiget REPORT instead of one GET per object — a 200-event search made 200 requests before.Calendar._create() now discovers and adopts a server-assigned canonical URL after creating a calendar, if the new compatibility feature create-calendar.stable-url is configured as not supported.compatibility_hints.py - the derivation logic was always tricky. Now a feature with a default value set is considered to be an independent feature - a feature without a default value is considered to be just a node in the hierarchy, and will derivate its default value from the children. I consider it to be a bugfix, but if you have a hand-written compatibility matrix for your server, things may break.Disclaimer: This section is mostly AI-generated - some of it rewritten by hand, some of it shortened down significantly, but for the most I've just asked the AI to do a better job organizing it and making it short.
search.py: the documented operator='==' exact-match guarantee was never enforced.search.py: add_property_filter('category', '', operator='undef') queried the nonexistent CATEGORY, and is-not-defined on that matches everything - so it returned every object.search.py: the search.combined-is-logical-and: unsupported workaround (triggered on e.g. Nextcloud) was faulty, causing wrong search results.search()'s generator driver now feeds exceptions raised while executing a request back into the search logic, so the server-compatibility fallbacks and per-object load error handling actually take effect (previously dead code). Applies to both the sync and async code paths.calendarobjectresource.py _complete_recurring_safe(): completing a recurring task would drop the caller-supplied completion_timestampcalendarobjectresource.py _get_duration(): a VTODO with a timed DTSTART and no DUE/DURATION got duration = timedelta(days=1) instead of timedelta(0), shifting the next due date by one day when completing a recurring task.lib/vcal.py fix(): truncated iCalendar data (no END: line) triggered a bare assert. Now logs a warning and returns the data unchanged instead.lib/vcal.py create_ical(): when both alarm_* props and ical_fragment were supplied, the fragment was injected before the first END:V line — which is END:VALARM, placing e.g. an RRULE inside the alarm component. The regex now targets END:V(EVENT|TODO|JOURNAL) specifically.lib/vcal.py fix(): the backslash-unescape step used ('\"') as a regex group, which matches only the literal two-character sequence '". A backslash before a lone ' or lone " was silently left in place. Fixed by using the character class ['\"].lib/vcal.py fix(): the trailing-whitespace fixup (re.sub(" *$", "", fixed)) lacked re.MULTILINE.calendarobjectresource.py change_attendee_status(): calling the method on an event with no ATTENDEE raised a bare KeyError('ATTENDEE') instead of NotFoundError.calendarobjectresource.py add_attendee(): "MAILTO:" was not accepted, the scheme check used str.startswith("mailto:") which is case-sensitive. RFC 3986 §3.1 specifies URI schemes are case-insensitive.datastate.py RawDataState.get_component_type(): tested for the string "BEGIN:FREEBUSY", but real iCalendar data uses "BEGIN:VFREEBUSY". Any FreeBusy object holding raw data returned component_type=None, causing problems further down. The same typo appeared in the base-class get_uid() and get_component_type() fallback parsers which looked for comp.name == "FREEBUSY" instead of "VFREEBUSY".calendarobjectresource.py _set_data(): the raw-string branch cleared the legacy _data/_vobject_instance/_icalendar_instance attributes but never reset self._state, causing data consistency problems in some circumstances.vcal.fix(): the COMPLETED date-to-datetime regex consumed the trailing newline, merging the following iCal property into the COMPLETED value on every inbound object from a server that stores COMPLETED as a plain date (e.g. SOGo). Fixed by using a lookahead (?=\s) instead of consuming \s.caldav.lib.error.ResponseError naming the URL and quoting what arrived, instead of letting the icalendar library raise a ValueError. from inside the icalendar library.NotFoundError also when the server reports the 404 inside a 207 Multi-Status.collection.py: the ownCloud @-quoting heuristic for a relative calendar-home-set lived in three copies — Principal.calendar_home_set, its async twin, and _sanitize_calendar_home_set_url() used by the PROPFIND extractor — and they had drifted: only the extractor's copy skipped a URL that already contains %40, so a home-set the server delivered part-encoded went through quote() a second time and came back with %2540. All three are now the one helper.URL.canonical(): two related bugs — (a) for URLs with an auth part, the canonical form could leak user:pass@ - which again could cause __eq__/__hash__ comparisons to fail. (b) for URLS with no auth part, unauth() returned self and canonical() then overwrote url_raw/url_parsed in place — a bare == or hash() call silently mutated the URL object, potentially re-encoding special characters (e.g. + → %2B) and causing subsequent requests to target the wrong resource._post_put: a 302 response to PUT always raised IndexError instead of following the redirect.davclient.py and async_davclient.py: rate-limit retry raised TypeError: unsupported operand type(s) for +=: 'NoneType' and 'float' on the second 429 response when the server provides no usable Retry-After value (compute_sleep_seconds returns None). The sleep_seconds += rate_limit_time_slept / 2 line executed before the sleep_seconds is None guard. Now re-raise RateLimitError first, then update the sleep estimate.davclient.py DAVClient.__init__(): (a) DAVClient(url='https://user@host/', password='secret') did not work. (b) URL-embedded credentials silently overrode explicit username/password kwargs - now explicit kwargs win. An explicit username discards the URL credentials wholesale rather than merging them field by field — otherwise DAVClient(url='https://bob:hunter2@cal.example.com/', username='alice') would ship alice's login with bob's password. Overriding only the password keeps the URL's username, which stays a coherent pair.async_davclient.py: HTML-on-401 diagnostic hint checked self.headers (the client's own request headers) for Content-Type: text/html instead of r.headers, so the intended "server returned an HTML login page, consider setting auth_type" message could never fire.lib/auth.py extract_auth_types(): a WWW-Authenticate header ending with a trailing comma (seen in the wild) raised IndexError in the set comprehension because h.split() on an empty segment fails. Added an if h.strip() guard.config.py resolve_features(): returning a named profile (features='xandikos') returned the module-level dict object directly without copying. Similarly testing.py XandikosServer/RadicaleServer used a shallow .copy(). This was causing mutation-problems.config.py get_connection_params(): explicit keyword arguments (e.g. get_davclient(password='secret')) were only respected when url or features was also present. When an env-var or config-file source was found instead, explicit params were silently dropped. Now things are merged. A keyword argument whose value is None counts as "not supplied" rather than "unset it", it's needed to explicitly use an empty string e.g. to override a password from environment with an empty password.config.py expand_config_section(): requesting a section name that is absent from the config raised KeyError instead of returning [], causing plain caldav.get_calendars() to crash with KeyError: 'default' on configs with no default section.config.py expand_config_section(): disable: true was silently ignored for sections fetched by explicit name or via a contains list — the check used the string literal "section" as the config key instead of the section variable. Only the glob "*" path honoured disable.features but no caldav_url were rejected, even though the URL can be derived from the auto-connect.url compatibility hints. Explicitly passed parameters already worked this way; now get_davclient(config_section=...) and friends behave consistently.config.py read_config(): only FileNotFoundError was caught while probing the optional config-file locations. With HOME unset (e.g. a Nix build sandbox) the default path expands to //.config//caldav/calendar.conf, which open() rejects with IsADirectoryError; that OSError propagated out of an optional probe, breaking get_davclient() and even crashing pytest's terminal summary renderer. Any OSError (not found, is-a-directory, permission denied) is now treated as "no config here".caldav.async_davclient reached the sync HTTP library through caldav.requests, so the httpx selection succeeded and the import then failed anyway, claiming no supported library was installed.async_davclient.py AsyncDAVClient.propfind(): a raw XML body passed as props did not work and caused arbitrary behaviour. This is allowable in the sync DAVClient.propfind(), but it's legacy and serves backward-compatible purposes. Rather than fixing the async code, a TypeError is now raised. XML body should be passed in the body-parameter.async_davclient.py _async_request(): when the auth probe got no 401 challenge (an HTML login page, say), the probe response was returned as the real one and the connection error lost.collection.py freebusy_request(): on an async client a Principal attendee raised AttributeError - get_vcal_address() returns a coroutine, and it was never awaited.async_davclient.py aio.get_calendars(calendar_name=...): the loop iterated a coroutine rather than the calendars, so a lookup by name always came back empty.async_davclient.py get_calendars(): lacked the GMX principal-URL fallback present in the sync client.collection.py Principal.calendar(cal_id=...): for async clients a bare (non-URL) cal_id/name raised TypeError: argument of type 'coroutine' is not a container or iterable.base_client.py get_calendars(calendar_urls=...): a calendar explicitly requested by URL was silently omitted from the result when its displayname property is the empty string "".base_client.py, collection.py and async_davclient.py: a calendar whose display name could not be read was silently skipped by a bare except Exception: pass during a lookup by name. The lookup still continues past such a calendar, but it now emits a log.warning unless the server is known not to support propfind.displayname, so an unexpected failure is visible instead of looking like "no such calendar".jmap/client.py and jmap/async_client.py update_event(): to honour RFC 8620 PatchObject merge semantics, the update null-injects every optional property absent from the new iCalendar so removed properties are actually cleared server-side. This doidn't work out for Stalwart, as it rejects properties it does not support. Workaround applied.jmap/client.py and jmap/async_client.py create_task(): a JMAP server response that returned an empty created dict raised a bare KeyError instead of the documented JMAPMethodError.jmap/objects/calendar.py JMAPCalendar.search(): datetime arguments for start/end were formatted with a tz-offset for tz-aware non-UTC datetimes. Naive datetimes were copied out verbatim. JMAP requires UTCDate format (YYYY-MM-DDTHH:MM:SSZ). Fixed by converting to UTC and using strftime.jmap/convert/jscal_to_ical.py: a recurrenceOverrides entry that does not include a "start" key (the common case — title-only change, description update, etc.) produced a child VEVENT with DTSTART copied from the master event's start time rather than from the override key. This effectively relocated every non-rescheduled override to the master's first occurrence, breaking all override display. Default is now the override key itself.jmap/convert/jscal_to_ical.py: EXDATE and RECURRENCE-ID values were always emitted as floating (timezone-less) DATE-TIME regardless of the event's timeZone or showWithoutTime flag. Per RFC 5545 §3.8.5.1 the value type must match DTSTART; a floating EXDATE on a TZID-anchored event does not match any instance, so excluded occurrences reappear. Override keys are now parsed with the event timezone applied (TZID-anchored events) or as date objects (all-day events).jmap/convert/_utils.py _format_local_dt(): UTC datetimes produced a Z-suffixed string. RFC 8984 §1.4 defines LocalDateTime (the type required for recurrenceOverrides keys and recurrenceRules.until) as a bare YYYY-MM-DDThh:mm:ss without any suffix; Z-suffixed override keys cannot match LocalDateTime occurrence keys, causing mismatches on strict servers. The function now returns a bare local representation — converted into the event's own timezone first, since a LocalDateTime is local to the event: dropping the offset from a UTC value instead of converting it would shift EXDATE/RECURRENCE-ID/UNTIL by the UTC offset on every TZID-anchored event, and emit a floating UNTIL against a TZID DTSTART, which RFC 5545 §3.3.10 forbids.jmap/convert/ical_to_jscal.py and jmap/convert/jscal_to_ical.py: the STATUS property was silently dropped in both conversion directions. STATUS:CANCELLED round-tripped as status: confirmed (JSCalendar default), so cancelled meetings appeared active. Mappings CONFIRMED ↔ confirmed, TENTATIVE ↔ tentative, CANCELLED ↔ cancelled are now implemented.jmap/client.py and jmap/async_client.py update_event(): RFC 8620 §3.3 specifies that absent keys in a PatchObject preserve the server value. update_event sent the full converted JSCalendar dict as the patch; properties the caller removed (e.g. LOCATION, VALARM) were absent from the patch and therefore silently persisted on the server. update_event now explicitly sets all optional top-level JSCalendar properties to null when they are absent from the conversion result, ensuring the server removes them..gitignore — global gitignore on developers laptop caused caldav-3.2.1.tar.gz to be shipped with .claude/settings.json and 1755 files under venv/, and the current tree would have added 443 files under .prompts/. A new package tox environment (run in CI, and now part of the release procedure) builds both artifacts and fails if anything git does not track turns up in them.lib/error.py PYTHON_CALDAV_COMMDUMP: when this debug env-var is set, a logging.warning() is now emitted at import time to remind the operator that request/response bodies and headers (including credentials and calendar PII) are being written to uniquely-named files under /tmp that may accumulate indefinitely.response.py: the XML parser is now constructed with resolve_entities=False, no_network=True, so a malicious or MITM server cannot inject arbitrary text into parsed property values through inline DOCTYPE entity definitions. On the lxml versions most people have this was already the effective behaviour (no_network defaults to True, and resolve_entities defaults to 'internal' from lxml 5.0), but lxml is an unpinned dependency and the parser should not be relying on another project's defaults for this.discovery.py discover_service(): require_tls=True was not enforced on the well-known URI redirect target — a same-domain Location: http://... passed the domain-validation check and was returned as ServiceInfo(tls=False), allowing a misconfigured or MITM server to silently downgrade the connection to plaintext. Fixed by checking well_known_info.tls against require_tls before returning the result.see #690
The changeset in 3.2.1 is predominently added async integration tests. Those tests should now be replicating all the logic in the good old sync integr
The changeset in 3.2.1 is predominently added async integration tests. Those tests should now be replicating all the logic in the good old sync integration tests under test_caldav.py. Some few more bugs were found while adding those tests.
There are two "feature commits" adding new parameters to existing functions. Those are minor additions and was required while fixing things (test breakage plus observed crash due to weird real-world-data), hence I define this to be a patch-release rather than a minor-release.
The changeset in 3.2.1 is predominantly added async integration tests. Those tests should now be replicating all the logic in the good old sync integration tests under test_caldav.py. Some few more bugs were found while adding those tests.
There are two "feature commits" adding new parameters to existing functions. Those are minor additions and was required while fixing things (test breakage plus observed crash due to weird real-world-data), hence I define this to be a patch-release rather than a minor-release.
Calendar.delete() has had a "wipe-mode" since v2.2.0, deleting items from the calendar if it's not possible to delete the calendar itself. Now a tristate wipe parameter has been added, wipe=True to wipe rather than delete the calendar, wipe=False to not wipe, and default behaviour (wipe=None) is still "wipe if needed". (Useful for NextCloud tests, where events stuck on calendars in the "trashbin" pollutes the namespace preventing the same event to be added to a new calendar).save() only_this_recurrence parameter is now a tristate:
True (default) - unchanged, if the object is a recurrence it will be merged with the master event, making sure the saved recurrence is stored as an exception to the RRULE. If the master object does not exist, then it will raise NotFoundError.None (new) - same as True, except that if the master object does not exist, the recurrence will just be sent directly to the server as-is.False - unchanged, the recurrence will be sent directly to the server as-is.
None is used in the add_object(). This change was needed to avoid a crash when trying to add a recurrence-object without a master to the server. (So much ado for a very weird edge case).HTTPDigestAuth.handle_401() calls r.connection.send() which returns a coroutine in async context, causing AttributeError: 'coroutine' object has no attribute 'history'. Fixed by using AsyncHTTPDigestAuth for the async client. See https://github.com/jawah/niquests/issues/387Calendar.freebusy_request() was not async-aware._async_complete() raised NotImplementedError for handle_rrule=True._async_put() did not await the retry coroutine returned by _post_put()._async_get_object_by_uid() was missing include_completed=True, unlike the sync version._async_search_with_comptypes() did not skip component types unsupported by the server, unlike the sync version.DisplayName is now omitted from the MKCALENDAR request body when create-calendar.set-displayname is unsupported.niquests (preferred) → httpxyz → httpx. See https://github.com/python-caldav/caldav/issues/611These changes are not part of the shipped library, but make up the bulk of the 3.2.1 changeset.
tests/test_async_integration.py grew by ~1700 lines) to mirror the sync suite in test_caldav.py. Part of git bug bug show e44ee06 aka https://github.com/python-caldav/caldav/issues/667testCheckCompatibility no longer takes ~8 minutes on servers with a search-cache delay (e.g. Bedework) — two bugs causing repeated cache-delay waits were fixed, and some redundant Bedework compatibility-matrix entries were cleaned up.test_caldav.py, test_caldav_unit.py).tests/test_servers/: registered Baikal's URL_ENV_VAR so the async-httpx CI job can reach it, and added a get_available_servers() helper used by the async integration tests.Emulate Docker CLI using podman banner string.uid=…,gid=… tmpfs mount options that Podman does not support (CCS / CalendarServer runs as root inside the container, so the ownership hint wasn't needed).testuser@example.org), weak passwords are rejected, and a workaround was added for Stalwart advertising https:// even when reached over http:// in local dev.mailto: email addresses for the scheduling test users (so iTIP delivery works), and disabled the CalDAV trashbin (calendarRetentionObligation=0) so HTTP DELETE hard-deletes objects and re-using a UID doesn't hit a UNIQUE constraint violation.imapd.conf with virtdomains: off (the default virtdomains: userid caused 403s on iTIP delivery due to userid/ACL mismatch), unpinned from the March 2026 digest now that :latest is stable again, and pointed the health-check at the CalDAV port.async (niquests fallback) job to async (niquests) to reflect that niquests is the default install, not a fallback.async (niquests), async (httpxyz fallback) and async (httpx fallback).scheme://hostname:port instead of silently rewriting them, which the 30-day cache had been masking — placeholder URLs were replaced with concrete examples (http://proxy.example.com:8080) in davclient.py and async_davclient.py, and .lycheeignore was updated accordingly.The two most significant news in v3.2 are relatively well-tested support for scheduling (RFC6638) and better-tested support for async. Care should sti
The two most significant news in v3.2 are relatively well-tested support for scheduling (RFC6638) and better-tested support for async. Care should still be taken, those features are backed by many tests, but lacks testing for how well they support real-world use-case scenarios. While async support was added in version 3.0, it was not well-enough tested. Still only a fraction of all the integration tests for sync usage has been duplicated in the async integration test, I expect to release 3.2.1 with symmetric async integration tests before 2025-07.
The two most significant news in v3.2 are relatively well-tested support for scheduling (RFC6638) and better-tested support for async. Care should still be taken, those features are backed by many tests, but lacks testing for how well they support real-world use-case scenarios. While async support was added in version 3.0, it was not well-enough tested. Still only a fraction of all the integration tests for sync usage has been duplicated in the async integration test, I expect to release 3.2.1 with symmetric async integration tests before 2025-07.
add_organizer() now accepts an optional explicit organizer argument (a Principal, vCalAddress, or email string)If-Schedule-Tag-Match or If-Match headers will be sent. A ScheduleTagMismatchError or ETagMismatchError will be raised on 412.save() then inserts SEQUENCE:1 unless the increase_seqno parameter is set to False.search()-results - https://github.com/python-caldav/caldav/issues/650_resolve_properties() would crash for some disbehaving servers. https://github.com/pycalendar/calendar-cli/issues/114Calendar.get_supported_components() would crash for some servers. https://github.com/python-caldav/caldav/issues/653accept_invite(), decline_invite() and tentatively_accept_invite() when the server does not expose the calendar-user-address-set property. https://github.com/python-caldav/caldav/issues/399get_object_by_uid(), aligning it with the rest of the search API. Closes https://github.com/python-caldav/caldav/issues/586I've been experimenting with Claude Code over the last few months, concerns have been raised that it may have negatively affected code quality - and indeed, this is probably a major reason why the async support in v3.0 was simply not good enough. I've been working a bit more on the AI-POLICY.md, some of the directions for the future looks like this:
The 3.2-release may not be fully up to those standards, as they were made while working on 3.2.
The branch v3.2-development contains "raw" commits, most of the commits are either AI-written (including commit message) or human-written. I've done quite some work trying to squash the commits into fewer commits, in the main branch all the recent commit messages are handwritten, and most of the commits have some notes on how much is AI-generated and why AI-generation was chosen. The manual walk-through of all the commits has been tedious, but useful for QA-purposes. I'm considering this to be the way forward.
I have all relatively fresh communication with Claude in JSON-files, and I was considering to embed them into the repository for increased transparency. Everything considered, I think it would involve too much noise, so I've skipped it as for now. If you want it, I will publish it.
copy, lxml.etree, CalendarSet, cdav/dav re-exports, Optional, timezone, Event/Todo type stubs), replaced bare except: clauses with specific exception types (KeyError, AttributeError, Exception where broad catching is intentional), and removed unused local variables.funding.json (https://fundingjson.org/) at the repository root. Closes https://github.com/python-caldav/caldav/issues/608_AsyncTestSchedulingBase added: async counterpart of _TestSchedulingBase with test_invite_and_respond and test_freebusy; TestAsyncSchedulingFor<Server> classes generated for each server with scheduling_users configured.scheduling.freebusy, rfc4791-freebusy have been collapsed down into freebusy (instead of freebusy.rfc4791).search.text.by-uid was removed, there is (probably?) no servers supporting one but not the other. (Though the checks on this may be wrong, as workarounds are automatically employed for servers not supporting text search). https://github.com/python-caldav/caldav/issues/586Fixups on the async support. Perhaps the "sans-io" design concept wasn't such a great idea - quite some gaps in the async support has been identified
Highlights:
get_calendars(): a single get_calendars() call can now span multiple config-file sections (including glob/wildcard expansion), aggregating calendars from multiple servers into one CalendarCollection. This was the idea (and has been implemented in my plann project for quite some time), but fell short of getting into the v3.0-release.Highlights:
get_calendars(): a single get_calendars() call can now span multiple config-file sections (including glob/wildcard expansion), aggregating calendars from multiple servers into one CalendarCollection. This was the idea (and has been implemented in my plann project for quite some time), but fell short of getting into the v3.0-release.get_icalendar_component() returns a deep-copy of the inner VEVENT/VTODO/VJOURNAL sub-component for read-only inspection, consistent with the get_icalendar_instance() naming convention.edit_icalendar_component() context manager yields the inner component for editing and delegates to edit_icalendar_instance() so all borrow/state/save machinery is reused.get_calendars() now accepts a config_section value that is expanded via expand_config_section(), so wildcards like "work_*" or "all" resolve to multiple leaf sections; each section gets its own DAVClient and all calendars are aggregated into a CalendarCollection. CalendarCollection now closes all its clients on context-manager exit.get_all_file_connection_params(config_file, section).PYTHON_CALDAV_USE_TEST_SERVER=1 (or testconfig=True) falls back to automatically starting the first available enabled server from the test-server registry when no testing_allowed config section is present. Three new env vars (PYTHON_CALDAV_TEST_EMBEDDED, PYTHON_CALDAV_TEST_DOCKER, PYTHON_CALDAV_TEST_EXTERNAL) control which server categories are eligible. Per-server priority: keys in config files are honoured.caldav/testing.py (shipped with the package): EmbeddedServer, XandikosServer, RadicaleServer — so pip-installed users can use PYTHON_CALDAV_USE_TEST_SERVER=1 without a source checkout.get_object_by_uid() (and get_event_by_uid(), get_todo_by_uid(), get_journal_by_uid(), and their deprecated aliases) raised TypeError with async clients because search() returned a coroutine that was iterated directly. Fixes https://github.com/python-caldav/caldav/issues/642complete() and the save()-recurrence path were not awaited for async clients.uncomplete(), set_relation(), get_relatives(), and invite() lacked async dispatch._handle_reverse_relations() called get_relatives() without await, silently returning a coroutine.get_calendar() and get_calendars() were missing from the caldav.aio re-export.get_calendars(config_section=…) silently ignored calendar_name and calendar_url keys in config sections — they were stripped before reaching the filter logic.expand_config_section() was not called when reading the config file, so contains:-style meta-sections had no effect.date objects passed to calendar.search() or calendar.searcher() as time-range boundaries now get coerced to UTC datetime before being forwarded to icalendar_searcher, silencing the "Date-range searches not well supported yet" warning.XandikosServer.is_accessible() now sends a minimal PROPFIND requesting only {DAV:}resourcetype instead of an implicit allprop, avoiding spurious NotImplementedError log lines from Xandikos during test-server startup.docs/source/async_tutorial.rst. Covers the same ground as the sync tutorial plus a "Parallel Operations" section demonstrating asyncio.gather(). The sync tutorial now links to it.docs/source/configfile.rst has been rewritten and extended; tests for inherits and env-var expansion added.docs/source/tutorial.rst rewritten and fixed.docs/source/.Highlight: Reintroducing debug communication dump functionality.
Highlight: Reintroducing debug communication dump functionality.
Highlight: Reintroducing debug communication dump functionality.
PYTHON_CALDAV_COMMDUMP is given, caldav communication is dumped to /tmp - details in https://github.com/python-caldav/caldav/issues/248 . This is regarded as "fix" rather than "feature" as it was introduced in v1.4.0 and accidentally dropped during the v3.0 refactoring. Restored, with the dump logic extracted into a shared helper so both the sync and async code paths benefit. Test code added to make sure it won't disappear again. Fixes https://github.com/python-caldav/caldav/issues/638search() raised NotImplementedError when a full calendar-query XML was passed and the server does not support search.comp-type.optional. This is a really rare and deprecated code path, but still NotImplementedError isn't good. Now it falls back to a single REPORT with the XML as-is. Fixes https://github.com/python-caldav/caldav/issues/637Minor bugfix to support old versions of httpx
Highlights:
Highlights:
tests/docker-test-servers/ox/. However, OX is undertested as both the caldav-server-checker and the test suite does not play well with OX (events with historic DTSTART etc are used, OX doesn't support that).search.unlimited-time-range feature flag with a workaround in search.py that injects a broad time range (1970–2126) for servers that return an empty result set when no time range is specified (but this still doesn't help to OX).AsyncDAVClient failed to initialize when using httpx < 0.23.0 because proxy=None was unconditionally passed to httpx.AsyncClient which did not accept a proxy keyword argument in older releases. Fixes https://github.com/python-caldav/caldav/issues/632"Deviation from expectations found" log error in production, or an assertion failure in debug mode.search.comp-type-optional has been renamed to search.comp-type.optional for consistency with the dotted-key naming convention used elsewhere. If you have this key set in a local server configuration, update it accordingly.Some minor improvements, including a fix for https://github.com/python-caldav/caldav/issues/635 - use canonical RFC-links.
Version 3.0 should be fully backward-compatible with version 2.x - but there are massive code changes in version 3.0, so if you're using the Python Ca
Version 3.0 should be fully backward-compatible with version 2.x - but there are massive code changes in version 3.0, so if you're using the Python CalDAV client library in some sharp production environment, I would recommend to wait for two months before upgrading.
Highlights
AsyncDAVClient and async domain objects using a Sans-I/O architecture. The same Calendar, Event, Todo, etc. objects work with both sync and async clients.caldav.jmap package with JMAPClient and AsyncJMAPClient for servers implementing RFC 8620 (JMAP Core) and RFC 8984 (JMAP Calendars). Note that this is experimental, and the public API may be changed in upcoming minor-releases.Version 3.0 should be fully backward-compatible with version 2.x - but there are massive code changes in version 3.0, so if you're using the Python CalDAV client library in some sharp production environment, I would recommend to wait for two months before upgrading.
Highlights
AsyncDAVClient and async domain objects using a Sans-I/O architecture. The same Calendar, Event, Todo, etc. objects work with both sync and async clients.caldav.jmap package with JMAPClient and AsyncJMAPClient for servers implementing RFC 8620 (JMAP Core) and RFC 8984 (JMAP Calendars). Note that this is experimental, and the public API may be changed in upcoming minor-releases.The tests broke with lots of AuthorizationErrors with GMX. The tests were running successfully towards GMX before releasing the last alpha-release. It's probably a transient issue. I don't want to delay the release by doing more research into it.
Be aware that some of the 2.x minor-versions also tagged some "Potentially Breaking Changes" - so if you're upgrading i.e. from 2.1, you may want to browse through the "Potentially Breaking Changes" for the intermediate minor releases too.
tests/conf.py has been removed and conf_private.py will be ignored. See the Test Framework section below.caldav/objects.py removed -- the backward-compatibility re-export shim has been deleted. Any code doing from caldav.objects import <something> must be updated; all public symbols remain available directly via caldav or from their respective submodules.caldav.config.read_config() now raises ValueError on YAML/JSON parse errors instead of logging and returning an empty dict. This ensures config errors are detected early.The following have been deprecated and emit DeprecationWarning:
calendar.date_search() - use calendar.search() insteadclient.principals() - use client.search_principals() insteadobj.split_expanded - may be removed in a future versionobj.expand_rrule - may be removed in a future version.instance property on calendar objects - use .vobject_instance or .icalendar_instanceresponse.find_objects_and_props() - use response.results insteadThe save_*-methods are deprecated but do not yet emit warnings (see https://github.com/python-caldav/caldav/issues/71):
calendar.save_event() - use calendar.add_event() insteadcalendar.save_todo() - use calendar.add_todo() insteadcalendar.save_journal() - use calendar.add_journal() insteadcalendar.save_object() - use calendar.add_object() insteadMethods that fetch data from the server should use the get_ prefix (see https://github.com/python-caldav/caldav/issues/92). The following are deprecated but do not yet emit warnings:
calendar.event_by_uid() - use calendar.get_event_by_uid() insteadcalendar.todo_by_uid() - use calendar.get_todo_by_uid() insteadcalendar.journal_by_uid() - use calendar.get_journal_by_uid() insteadcalendar.object_by_uid() - use calendar.get_object_by_uid() insteadprincipal.calendars() - use principal.get_calendars() insteadcalendar.events() - use calendar.get_events() insteadcalendar.todos() - use calendar.get_todos() insteadcalendar.journals() - use calendar.get_journals() insteadcalendar.objects_by_sync_token() - use calendar.get_objects_by_sync_token() insteadThe following check_*_support() methods are deprecated but do not yet emit warnings:
client.check_dav_support() - use client.supports_dav() insteadclient.check_cdav_support() - use client.supports_caldav() insteadclient.check_scheduling_support() - use client.supports_scheduling() instead
(Those methods actively probe the server; is_supported() is a configuration lookup.)Additionally, direct DAVClient() instantiation should migrate to get_davclient() factory method (see docs/design/API_NAMING_CONVENTIONS.md)
Experimental JMAP calendar client — new caldav.jmap package providing a JMAP client
for servers implementing RFC 8620 (JMAP Core) and RFC 8984 (JMAP Calendars).
Features:
JMAPClient and asynchronous AsyncJMAPClient with mirrored APIscreate_event, get_event, update_event,
delete_event, search_events)get_sync_token / get_objects_by_sync_tokencreate_task, get_task, update_task, delete_taskget_jmap_client() factory reads from the same config sources as
get_davclient() (env vars, config file)Full async API - New AsyncDAVClient and async-compatible domain objects:
from caldav.async_davclient import get_davclient
async with await get_davclient(url="...", username="...", password="...") as client:
principal = await client.get_principal()
calendars = await client.get_calendars()
for cal in calendars:
events = await cal.get_events()
Retry-After / rate-limit handling (RFC 6585 / RFC 9110) -- DAVClient and AsyncDAVClient now expose rate_limit_handle, rate_limit_default_sleep, and rate_limit_max_sleep parameters (this may be specified in the configuration file as well). When rate_limit_handle=True the client automatically sleeps and retries on 429 Too Many Requests and 503 Service Unavailable responses that include a Retry-After header. When rate_limit_handle=False (default) a RateLimitError is raised immediately so callers can implement their own back-off strategy. New caldav.lib.error.RateLimitError has retry_after (raw header string) and retry_after_seconds (parsed float) attributes. https://github.com/python-caldav/caldav/issues/627
search.is-not-defined.category and search.is-not-defined.dtend -- new client-side workaround sub-features for servers that do not support the CALDAV:is-not-defined filter natively for these properties.
Base+override feature profiles -- YAML config now supports inheriting from a base profile:
my-server:
features:
base: nextcloud
search.comp-type: unsupported
Compatibility fixes
save-load.event.recurrences.exception which is supported if the server stores master+exception VEVENTs as a single calendar object as per the RFC. Stalwart splits them into separate objects. Stalwart recombines the data when doing an expanded search, so expand=True searches now automatically fall back to server-side CALDAV:expand. (Arguably, unsupported here could also mean the exception data was simply discarded. If needed, I'll refine this in a future version)save-load.journal.mixed-calendar - some calendar servers offers a separate journal list.save-load.reuse-deleted-uid - server allows immediate reuse of an uid if the old object has been deletedsearch.time-range.*.old-dates - test data mostly have historic dates. Calendars are primarily made for future happenings. Some calendar servers does not support searching for things that happened 20 years ago, even for a very small calendar.search.is-not-defined.category and search.is-not-defined.dtend - actually, those are artifacts. The bug was on the client side, not server side. I may delete them in a future release.calendar-home-set property is not available (e.g. GMX).CalendarObjectResource.load() now falls back to UID-based lookup when servers change object URLs after a save.Added python-dateutil and PyYAML as explicit dependencies (were transitive)
Quite some methods have been renamed for consistency and to follow best current practices. See the Deprecated section.
Calendar class now accepts a name parameter in its constructor, addressing a long-standing API inconsistency (https://github.com/python-caldav/caldav/issues/128)
CalendarObjectResource.id property - Returns the UID of calendar objects (https://github.com/python-caldav/caldav/issues/515)
calendar.searcher() API - Factory method for advanced search queries (https://github.com/python-caldav/caldav/issues/590):
searcher = calendar.searcher()
searcher.add_filter(...)
results = searcher.search()
``
Improved API for accessing the CalendarObjectResource properties (https://github.com/python-caldav/caldav/issues/613 ):
get_data(), get_icalendar_instance, get_vobject_instance, get_icalendar_component:
edit_* (but no edit_data - the data is an immutable string, should use simply object.data = foo for editing it)
with obj.get_foo, the client may edit foo, and then obj.save() to send it to the server.is-not-defined filter for CATEGORIES did not work, and for DTEND it did not work for full day events. (this was fixes in the icalendar-searcher, version 1.0.5).CalendarObjectResource properties (https://github.com/python-caldav/caldav/issues/613 )import caldav is now significantly faster. Heavy dependencies (lxml, niquests, icalendar) are deferred until first use. https://github.com/python-caldav/caldav/issues/621_search_impl yields (SearchAction, data) tuples consumed by sync or async wrappersget_connection_params() provides unified config discovery with clear priority (explicit params > test server config > env vars > config file)${VAR} and ${VAR:-default} environment variable expansion in config valuestests/conf.py to new tests/test_servers/ frameworktests/test_servers/ module. It provides YAML-based server configuration: see tests/test_servers/__init__.py for usageconvert_conf_private.py migration tool for legacy config formattest_lazy_import.py; expanded test_async_davclient.py, test_async_integration.py, test_compatibility_hints.py, test_search.py, test_caldav_unit.pyCheckRecurrenceSearch now also verifies implicit recurrence support for all-day (VALUE=DATE) recurring events, marking the feature as fragile (with behaviour description) when only datetime recurring events work.calendar.search -- Tobias Brox (@tobixen)get_display_name() -- Tobias Brox (@tobixen)add_object vs save_object (reopened, reverted and closed)get_davclient to be importable from caldav -- Tobias Brox (@tobixen)The following people contributed to this release through issue reports, pull requests, and/or commits:
Since the 2.2.1-release and excluding the JMAP-work done by Sashank, Tobias has spent around 132 hours on this project.
In the 3.0-release, AI-tools have been used for improving quality and speed. My first impression was very good. It seemed like the AI understood the project, and it could fix things faster and better than what I could do myself - I really didn't expect it to create any good code at all. Well, sometimes it does, other times not. Soon enough I also learned that the AI is good at creating crap code, breaking things and Claude is particularly good at duplicating code and code paths. In the end, despite using Claude I've spent more time on this release than what I had estimated. However, I believe I've done a quite thorough work on preserving backward-compatibility while also developing a better API.
From my roadmap, those are the estimates:
In addition, lots of time spent on things that aren't covered by the roadmap:
> AI-generated release notes — see CHANGELOG.md for the full entry.
AI-generated release notes — see CHANGELOG.md for the full entry.
Mostly bugfixes and server compatibility improvements since 3.0.0a1, plus a few new features.
This is an alpha release for testing purposes. Please report issues at https://github.com/python-caldav/caldav/issues
rate_limit_handle, rate_limit_default_sleep, rate_limit_max_sleep parameters on DAVClient and AsyncDAVClient; new RateLimitError exception with retry_after / retry_after_seconds attributes (PR #628, thanks temsocial)import caldav is now significantly faster; heavy dependencies deferred until first usesearch.is-not-defined.category and search.is-not-defined.dtend client-side workaround sub-featuresbase: nextcloud)caldav.configcalendar-home-set property is missingCalendarObjectResource.load() fallback to UID lookup when servers change object URLs after savecaldav/objects.py re-export shim removed — update from caldav.objects import X to from caldav import Xcaldav.config.read_config() now raises ValueError on YAML/JSON parse errors instead of silently returning {}icalendar-searcher >= 1.0.5 now required (fixes is-not-defined filter for CATEGORIES with icalendar >= 6.x, and for DTEND on recurring all-day events)ssl_verify_cert not passed through in get_sync_client / get_async_client_derive_from_subfeatures partial-config derivation bugcompatibility_hints. prefix_search_with_comptypes fallback when search.comp-type is brokencreate-calendar feature incorrectly derived as unsupportedget_object_by_uid() routing through search() for server-specific retry logicCCS (Apple CalendarServer), Zimbra, Cyrus, Bedework, PurelyMail, GMX, ecloud, Posteo, SOGo, Baikal/Radicale, DAViCal, Synology, Xandikos
Nothing published for this version
This will hopefully be the last releases before v3.0. 2.2.4 is without niquests dependency, 2.2.6 depends on niquests
v2.2.6 - various minor fixes
This will hopefully be the last releases before v3.0. 2.2.4 is without niquests dependency, 2.2.6 depends on niquests
See CHANGELOG.md for details.
Nothing published for this version
Nothing published for this version
Users of the ckulka/baikal:nginx docker image could not get HTTP/2 multiplexing to work together with authentication. Workarounds done to turn off mul
Users of the ckulka/baikal:nginx docker image could not get HTTP/2 multiplexing to work together with authentication. Workarounds done to turn off multiplexing on affected systems.
Nothing published for this version
New ways to set up client connections:
Highlights:
features configuration flag.v2.2.1 comes with the requests dependency, v2.2.2 comes with niquests dependency (and v2.2.0 with a non-existing riquests dependency ... duh)
Version 2.1.0 comes without niquests in the dependency file. Version 2.1.2 come with niquests in the dependency file. Also fixed up some minor mistake
Version 2.1.0 comes without niquests in the dependency file. Version 2.1.2 come with niquests in the dependency file. Also fixed up some minor mistakes in the CHANGELOG. Version 2.1.1 was yet another mistake done during the release process and should be ignored.
See description of version 2.1.0 or CHANGELOG.md for more details.
Nothing published for this version
I'm working on a caldav compatibility checker side project. While doing so, I'm working on redefining the "compatibility matrix". This should only aff
I'm working on a caldav compatibility checker side project. While doing so, I'm working on redefining the "compatibility matrix". This should only affect the test code. If you maintain a file tests/conf_private.py, chances are that the latest changesets will break Since "running tests towards private CalDAV servers" is not considered to be part of the public API, I deem this to be allowed without bumping the major version number. If you are affected and can't figure out of it, reach out by email, GitHub issue or GitHub discussions. (Frankly, I'm interessted if anyone except me uses this, so feel free to reach out also if you can figure out of it).
As always, the new release comes with quite some bugfixes, compatibility fixes and workarounds improving the support for various calendar servers observed in the wild.
See https://github.com/python-caldav/caldav/issues/530
See https://github.com/python-caldav/caldav/issues/530
Here are the most important changes in 2.0:
Here are the most important changes in 2.0:
davclient.principals() to search for other principals on the server - and from there it's possible to do calendar searches and probe what calendars one have access to. If the server will allow it.This will be the last minor release before 2.0. The scheduling support has been fixed up a bit, and saving a single recurrence does what it should do,
This will be the last minor release before 2.0. The scheduling support has been fixed up a bit, and saving a single recurrence does what it should do, rather than messing up the whole series.
Version 1.5 comes with support for alarms (searching for alarms if the server permits and easy interface for adding alamrs when creating events), lots
Version 1.5 comes with support for alarms (searching for alarms if the server permits and easy interface for adding alamrs when creating events), lots of workarounds and fixes ensuring compatibility with various servers, refactored some code, and done some preparations for the upcoming server compatibility hints project.
Python 3.7 is no longer tested (dependency problems) - but it should work. Please file a bug report if it doesn't work. (Note that the caldav library pulls in many dependencies, and not all of them supports dead snakes).
event.load() fails, it will retry the load by doing a multiget - https://github.com/python-caldav/caldav/pull/460 and https://github.com/python-caldav/caldav/pull/475 - https://github.com/python-caldav/caldav/issues/459tests/compatibility_issues.py has been moved to caldav/compatibility_hints.py, this to make it available for a caldav-server-tester-tool that I'm splitting off to a separate project/repository, and also to make https://github.com/python-caldav/caldav/issues/402 possible.objects.py-file has been split into three - https://github.com/python-caldav/caldav/pull/483multiget in https://github.com/python-caldav/caldav/pull/492tests/test_caldav.py to tests/conf.py. This allows for:
conf_private.pytests.client-method, which is also used in the examples-section.check_server_compatibility-scriptauto_conn, auto_calendar and auto_calendars may read caldav connection and calendar configuration from a config file, environmental variables or other sources. Currently I've made the minimal possible work to be able to test the caldav-server-tester script.calendar.search(..., sort_keys=("DTSTART") will work. Sort keys expects a list or a tuple, but it's easy to send an attribute by mistake. https://github.com/python-caldav/caldav/issues/448 https://github.com/python-caldav/caldav/pull/449class_-parameter now works when sending data to save_event() etc.journal=True. ref https://github.com/python-caldav/caldav/issues/237 and https://github.com/python-caldav/caldav/pull/486Lots of work lifting the project up to more modern standards and improving code, thanks to Georges Toth (github @sim0nx), Matthias Urlichs (github @sm
["--application-directories", "src"], nothing doing by @ArtemIsmagilov in https://github.com/python-caldav/caldav/pull/421datetime.utcnow(). by @smurfix in https://github.com/python-caldav/caldav/pull/440Full Changelog: https://github.com/python-caldav/caldav/compare/v1.3.9...v1.4.0
Nothing published for this version
Refer to the CHANGELOG.md for a full list
Refer to the CHANGELOG.md for a full list
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Thanks to @bvanjeelharia for reporting and investigating (actually the traceback was reported already by @robinmayol in https://github.com/python-cald
Thanks to @bvanjeelharia for reporting and investigating (actually the traceback was reported already by @robinmayol in https://github.com/python-caldav/caldav/issues/270 but we failed to connect the dots).
…merging this pull request. To avoid breaking changes in v1.x, I threw in an assert instead.
Not much, but one bugfix, again the caldav library was not working for everyone despite lots of functional testing ...
Full Changelog: https://github.com/python-caldav/caldav/compare/v1.1.3...v1.2.0
Pull request by @danigm in https://github.com/python-caldav/caldav/pull/228
Python2 has not been tested for quite some time, hence it has probably been broken since one of the 0.x-releases. I decided to officially drop support for python2 in version 1.0 - but since the release was overdue I procrastinated merging this pull request. To avoid breaking changes in v1.x, I threw in an assert instead.
Pull request by @JasonSanDiego in https://github.com/python-caldav/caldav/pull/288 (with style fixup in https://github.com/python-caldav/caldav/pull/291 ) allows headers parameter to the DAVClient constructor.
Rationale given in https://github.com/python-caldav/caldav/issues/285 :
I'm using Nextcloud and want to retrieve calendar (read only) subscriptions along with the normal read/write calendars. Nextcloud supports two ways of doing this. The easier of the two is to pass the custom HTTP header: X-NC-CalDAV-Webcal-Caching: On
A bug was introduced in version 1.0, via https://github.com/python-caldav/caldav/pull/260 - the code would only work if there was a space in the WWW-Authenticate header. This works for most servers as they will challenge for credentials using a header like WWW-Authenticate: Basic realm="My CalDAV server" - however, WWW-Authenticate: Basic is fully allowed by RFC2617.
Thanks to @jdrozdnovak for debugging and reporting.
https://github.com/python-caldav/caldav/issues/289 - https://github.com/python-caldav/caldav/pull/290
Full Changelog: https://github.com/python-caldav/caldav/compare/v1.1.2...v1.1.3
Full Changelog: https://github.com/python-caldav/caldav/compare/v1.1.2...v1.1.3
Nothing published for this version
Nothing published for this version
Tests broke for what was tagged with 1.0.0 ... because I got interrupted while doing the last changes in the changelog!
Tests broke for what was tagged with 1.0.0 ... because I got interrupted while doing the last changes in the changelog!
Version 1.0 is no big gamechanger compared to version 0.x. The biggest change is the commitment that there shouldn't be any breaking changes in any su…
Version 1.0 is no big gamechanger compared to version 0.x. The biggest change is the commitment that there shouldn't be any breaking changes in any subsequent 1.x-releases.
I had some thoughts in https://github.com/python-caldav/caldav/issues/92 to introduce new API in version 1.0, but have reconsidered. For one thing SEMVER states:
All three points apply and they have done that for a long time, hence a 1.0-release is way overdue, and any API changes will have to wait for 2.0. I'm also intending that the only major breaking changes in 2.0 will be the removal of things that already is marked as deprecated in 1.0. If your library depends on caldav, put "caldav<3.0" in the requirements.
Python2.x is now officially not supported - I've thrown in an assert that we're using python3. In version 1.1, some code for supporting python2 will be cleaned away ... unless, if anyone screams out that they would like to run the newest caldav library version on an old python version, I may reconsider.
Timezones are difficult! When an event is created through the "new" interface, and a datetime object without time zone is passed, version 0.x would send it over to the calendar servr without time zone information as a "floating time" - now it will be converted to UTC-time and sent to the server as such.
"Floating time" is defined at https://www.rfc-editor.org/rfc/rfc5545#section-3.3.5 and may be useful in some circumstances (like, from time to time, I'm trying to maintain a ritual "raise the flag on the boat at 08:00 local time every morning"). However, I believe that in a majority of cases the lack of time zone is unintentional and meant to be local time. In recent versions of python, dt.astimezone(utc) will assume dt is in local time and convert it to UTC, which in most cases probably is the correct thing to do.
If one intentionally wants to create events or tasks with "floating time", then one may use the ical_fragment parameter.
This may have the unfortunate side effect that some clients that aren't aware of their time zone (possibly including my calendar-cli - I will have to look into that) will show events in UTC-time rather than local time. I think the proper thing would be to either fix those clients to be timezone-aware, or even better, to always be explicit and always put the local time zone into the datetimes passed to calendar.save_event().
len(calendar.objects()) did not workDocumentation now has sections on backward compatibility and "Schrodingers support" for old python versions.
The basic_usage_examples.py has been rewritten from scratch.
As always, the test suite is an evergrowing everchanging beast.
Almost all the work has been done through github pull requests this time - making it a lot easier to maintain the changelog. Those pull requests have gone into 1.0:
Some few fixups were done to some of the pull requests after the pull request was added to the master branch - in those cases I've just pushed it directly to the master branch.
I used to have a list of github issues that were touched by a release, and I also used to give credits to people that have contributed simply by raising issues. It's a lot of work going through all the issues, so I will skip it this time.
Full Changelog: https://github.com/python-caldav/caldav/compare/v0.11.0...v1.0.0
Version 0.11 contains minor changes that may break backward compatibility (according to the SemVer specification backward incompatible changes are all…
v0.10 and v0.11 does introduce some "bugfixes" and refactorings which
are supposed to be harmless and which haven't caused any breakages in
tests - but I cannot vouch for that it will not have unintended side
effects in your environment. If you're using the caldav library for
production-critical tasks, you may want to hang on for a while before
upgrading, or wait for v0.11.1. Version 0.11 contains minor changes
that may break backward compatibility (according to the SemVer
specification backward incompatible changes are allowed when doing
0.x-releases. Anyway, according to my knowledge this is the first
time a release contained things breaking backward-compatibility. The
return from the search method has changed a bit, I think I can do this
because v0.10 hasn't been out for long, hence most likely most users
will be using calendar.date_search() rather than calendar.search()
for doing timerange searches, and because the change is relatively
harmless and unlikely to break things. The return from the data
property is now enforced to be a normal string with unix linebreaks,
this is more likely to cause problems, but the previous behaviour was
unpredictable and would anyway sooner or later cause problems for
people depending on the return type to be a binary or being with
carriage returns).
Daniele Ricci has made support for client-side expanding, intended for the calendar servers that supports recurrences but not server-side expanding.
For expanded recurrences, the search-method will (by default)
deliver each recurrence as a separate object (i.e. caldav.Event).
This is slightly backward incompatible with v0.10.
Now obj.data will always return an ordinary string with ordinary
line breaks, while obj.wire_data will always return a byte string
with CRLN line endings. This may break thinsg if the client
expects a binary return, or depends on carriage returns in the
output. While the return type of obj.data has been slightly
unpredictable, it may still have been deterministic dependent on
usage pattern - so the caller may have gotten some expectations
which may now be broken.
Bugfixes, some of the new code in v0.10 didn't handle icalendar data containing a timezone. Some other minor bugfixes.
Nothing published for this version
Nothing published for this version
Tweaks to support the DAVMail server implementation
It's now possible to put things into calendars without first creating valid ical data (just pass things like tdstart etc to the save_event/save_journa
It's now possible to put things into calendars without first
creating valid ical data (just pass things like tdstart etc to the
save_event/save_journal/save_todo methods).
The DAVClient object can now work as a context manager
The authentication code was "fixed" in 0.8.x to work around some weird bug in one specific calendar server, but this introduced lots of problems for other servers. It was then rewritten in 0.9, but still causing (regression) problems with some servers deviating slightly from the relevant RFCs. With some help from Bjoern Kahl, Markus Behrens and Michael Thingnes I believe it should now be quite robust. (IMO, this work does not belong in the caldav library, ideally it should suffice to pass username and password to the requests library).
Some other minor bugfixes and more work on the test framework
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.