You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Critical voices said the documentation many places looks like a personal opinionated blog. I've tried dealing a bit.
* The "about"-file is big and contains too much different information. Probably some of the information should be split out or moved to other places. As for now, I've slashed some content that seemed less up-to-date and/or useful.
AI Prompts (claude-sonnet-4-6):
prompt: I'm going to improve the documentation, the docs under
docs/source as well as docstrings in the code (but not the text
documents under the project root nor docs/design). In this session I
want to do all the work myself, but I'd like some suggestions and
thoughs on what is the priority. I was told: (...) The docs contain a
lot of outdated, personal editorializing and opinions, which would be
fine on a blog, but not so much in documentation, except as a "Design
defense" explanation document.
prompt: please comment on my changes, and fix typos/grammar errors
followup-prompt: (the changes can be found in) ~/caldav, commit 80901d3
followup-prompt: commit
prompt: please comment on my changes, and fix typos/grammar errors
followup-prompt: commit
prompt: do you see anything that is obviously outdated?
follow-prompt: Please convert the markdown link to RST
followup-prompt: Fix typos.
Copy file name to clipboardExpand all lines: docs/source/about.rst
+20-78Lines changed: 20 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,7 @@ If serious problems are found with v2.2.6 during 2026, v2.2.7 will be
41
41
released.
42
42
43
43
The 3.x version series (released 2026-03) is almost
44
-
backwards-compatible with version 2.x. Python 3.10+ is required
45
-
(Python 3.8 and 3.9 are no longer supported). The
44
+
backwards-compatible with version 2.x. The
46
45
``caldav/objects.py`` backward-compatibility shim has been removed;
47
46
any code doing ``from caldav.objects import <something>`` must be
48
47
updated to import directly from ``caldav``. The wildcard import has
@@ -59,7 +58,7 @@ Python compatibility notice
59
58
===========================
60
59
61
60
Most of the code is regularly tested towards different versions of
62
-
Python, the oldest being Python 3.10 (as of v3.0).
61
+
Python. As of 3.x.x, 3.10 to 3.14 is tested. The 3.x-series does not support Python 3.8 (due to type hints), Python 3.9 is just not tested.
63
62
64
63
Support for Python2 was officially not supported starting from caldav
65
64
version 1.0.
@@ -105,28 +104,6 @@ support, but as many people requested the vobject dependency to be
105
104
replaced with icalendar, both are now supported, and the icalendar
106
105
library is now consistently used internally
107
106
108
-
Misbehaving server implementations
109
-
----------------------------------
110
-
111
-
Some server implementations may have some "caldav"-support that either
112
-
doesn't implement all of :rfc:`4791`, breaks the standard a bit, or has
113
-
extra features. As long as it doesn't add too much complexity to the
114
-
code, hacks and workarounds for "badly behaving caldav servers" are
115
-
considered to be within the scope. Ideally, users of the caldav
116
-
library should be able to download all the data from one calendar
117
-
server or cloud provider, upload it to another server type or cloud
118
-
provider, and continue using the library without noticing any
119
-
differences. To get there, it may be needed to add tweaks in the
120
-
library covering the things the servers are doing wrong.
121
-
122
-
There exists an extension to the standard covering calendar color and
123
-
calendar order, allegedly with an xml namespace
124
-
``http://apple.com/ns/ical/``. That URL gives (301 https and
125
-
then) 404. I've so far found no documentation at all
126
-
on this extension - however, it seems to be supported by several
127
-
caldav libraries, clients and servers. As of 0.7, calendar colors and
128
-
order is available for "power users".
129
-
130
107
131
108
Notable classes and workflow
132
109
============================
@@ -144,7 +121,7 @@ Notable classes and workflow
144
121
145
122
* From the calendar object one can fetch / generate
146
123
:class:`caldav.calendarobjectresource.Event` objects and
147
-
:class:`caldav.calendarobjectresource.Todo` objects (as well as :class:`caldav.calendarobjectresource.Journal` objects - does anyone use Journal objects?). Eventually the library may also spew out objects of the base class (:class:`caldav.calendarobjectresource.CalendarObjectResource`) if the object type is unknown when the object is instantiated.
124
+
:class:`caldav.calendarobjectresource.Todo` objects, as well as :class:`caldav.calendarobjectresource.Journal` objects. The library may also spew out objects of the base class (:class:`caldav.calendarobjectresource.CalendarObjectResource`) if the object type is unknown when the object is instantiated.
148
125
149
126
* If one happens to know the URLs, objects like calendars, principals
150
127
and events can be instantiated without going through the
@@ -160,10 +137,11 @@ For convenience, the classes above are also available as
160
137
Compatibility
161
138
=============
162
139
163
-
CalDAV server implementations vary widely in which optional RFC features they
164
-
support, and how gracefully they handle things they do not support. The caldav
165
-
library contains a compatibility layer that works around known issues
166
-
automatically when the server is identified.
140
+
The calendaring server supporting the CalDAV standards fully and perfectly does not exist. CalDAV server implementations vary widely in which optional RFC features they
141
+
support, and how gracefully they handle things they do not support, as well as how the standard is interpreted, things not working due to bugs, etc.
142
+
143
+
The caldav library contains a compatibility layer that works around
144
+
some known issues automatically when the server is identified.
167
145
168
146
Compatibility hints system
169
147
--------------------------
@@ -187,6 +165,10 @@ range when ``search.unlimited-time-range`` is ``broken``).
187
165
Configuring compatibility hints
188
166
--------------------------------
189
167
168
+
A separate tool https://github.com/python-caldav/caldav-server-tester has been split out to do compatibility testing towards the servers. The results are stored in ``caldav/compatibility_hints.py``. The server supporting everything in the CalDAV RFCs perfectly does not exist.
169
+
170
+
Compatibility testing has traditionally only been done by the maintainer - one of the purposes of the caldav-server-tester is to allow anyone to run the checks towards the software they use, without having to share any account information with the CalDAV maintainer. The tool may spit out code blocks to be included in the compatibility hints file, as well as yaml snippets to be included in configuration files.
171
+
190
172
The ``features`` parameter of :func:`caldav.get_davclient` (or
191
173
:class:`caldav.DAVClient`) selects a named server profile from
192
174
``compatibility_hints.py``, or accepts a dict of feature overrides:
@@ -216,49 +198,9 @@ that the server deviates from the standard.
216
198
Server-specific highlights
217
199
--------------------------
218
200
219
-
* **iCloud, Google, Zimbra** are notoriously incomplete in their CalDAV
220
-
support — see the server profile names ``icloud``, ``google``, ``zimbra``
221
-
in ``compatibility_hints.py`` for the current list of known issues.
222
-
223
-
iCloud has not been tested for a while. As the maintainer has no account there, YOUR help is needed to ensure iCloud-compatibility.
224
-
225
-
Notable iCloud limitations (tracked in https://github.com/python-caldav/caldav/issues/3):
226
-
227
-
* No support for freebusy, tasks, or journals.
228
-
* Broken or absent support for recurring events.
229
-
* Objects deleted from one client may reappear after recreating a
230
-
calendar with the same name.
231
-
* ``get_object_by_uid()`` does not work despite following the RFC example.
232
-
233
-
Google's CalDAV adapter does not support creating calendars; use the Google
234
-
API directly for that. As with iCloud, Google support hasn't been tested for quite a while.
235
-
236
-
* **Radicale** will auto-create a calendar when accessing a URL that does not
237
-
exist, and listing calendars owned by the user may fail.
238
-
239
-
* **Baikal** does not support date-range searches for todo tasks.
240
-
241
-
* **DAViCal** has slightly broken support for date-range searches on todos.
242
-
243
-
* **OX App Suite** applies a "sliding window" to all calendar REPORT queries:
244
-
objects whose date lies too far in the past (or future) are invisible.
245
-
There is no CalDAV mechanism to enumerate those objects — they are invisible
246
-
to ``calendar.search()``, ``calendar.events()``,
247
-
``calendar.get_objects_by_sync_token()``, and ``calendar.get_object_by_uid()``;
248
-
the only way to access them is a direct GET if the URL is already known.
249
-
The library works around this by injecting an explicit 1970–2126 time range
250
-
(``search.unlimited-time-range: broken``), which makes recurring events with
251
-
future occurrences visible, but truly old non-recurring objects remain
252
-
inaccessible. OX also rejects VTODOs containing RRULE with HTTP 400, and
253
-
VTODOs must be stored in a calendar explicitly created for the ``VTODO``
254
-
component type.
255
-
256
-
* **Calendar creation** is not mandatory under :rfc:`4791`. Most self-hosted
257
-
servers support it; Google's CalDAV adapter does not.
201
+
Over the past years, the focus has been on compatibility-testing towards open source calendar servers. In particular Google and iCloud haven't been tested for a long time. Google officially supports CalDAV, see https://developers.google.com/workspace/calendar/caldav/v2/guide - iCloud supports CalDAV partly, but there exists no official information about it. iCloud limitations has been tracked in https://github.com/python-caldav/caldav/issues/3
258
202
259
-
* **Recurring events and tasks** are non-trivial to implement correctly on
260
-
the server side. DAViCal and Baikal are the only servers known to handle
261
-
them correctly in the test suite.
203
+
(This section contained lots of detailed information on how the different servers handle it, but it has been removed as much of it was outdated. All the information is available in ``compatibility_hints.py``, though it should probably be redone a bit for better readability)
262
204
263
205
Some notes on CalDAV URLs
264
206
=========================
@@ -274,7 +216,7 @@ CalDAV URLs can be quite confusing, some software requires the URL to the calend
If you encounter troubles with iCloud, try toggling
277
-
between IPv4 and IPv6 (see [issue 393](https://github.com/python-caldav/caldav/issues/393))
219
+
between IPv4 and IPv6 (see `issue 393<https://github.com/python-caldav/caldav/issues/393>`_)
278
220
279
221
* Google - legacy: ``https://www.google.com/calendar/dav/``,
280
222
The calendar URL for the primary personal calendar seems to be of the
@@ -283,13 +225,13 @@ CalDAV URLs can be quite confusing, some software requires the URL to the calend
283
225
namespace.
284
226
285
227
* Google - new api: see https://developers.google.com/calendar/caldav/v2/guide.
286
-
There is some information in https://github.com/python-caldav/caldav/issues/119 on how to connect to Google, and there are two contributed :ref:`examples:examples` on how to obtain a bearer token and use it in the caldav lbirary. There is also a `blog post <https://blog.lasall.dev/post/tell-me-why-google-and-caldav/>`_ describing the process.
228
+
There is some information in https://github.com/python-caldav/caldav/issues/119 on how to connect to Google, and there are two contributed :ref:`examples:examples` on how to obtain a bearer token and use it in the caldav library. There is also a `blog post <https://blog.lasall.dev/post/tell-me-why-google-and-caldav/>`_ describing the process.
287
229
288
230
* DAViCal: The caldav URL typically seems to be on the format ``https://your.server.example.com/caldav.php/``, though it depends on how the web server is configured. The primary calendars have URLs like ``https://your.server.example.com/caldav.php/donald/calendar`` and other calendars have names like ``https://your.server.example.com/caldav.php/donald/golfing_calendar``.
289
231
290
232
* Zimbra: The caldav URL is typically on the format ``https://mail.example.com/dav/``, calendar URLs can be on the format ``https://mail.example.com/dav/donald@example.com/My%20Golfing%20Calendar``. Display name always matches the last part of the URL.
291
233
292
-
* Fastmail: ``https://caldav.fastmail.com/dav/`` - note that the trailing dash is significant (ref https://github.com/home-assistant/core/issues/66599)
234
+
* Fastmail: ``https://caldav.fastmail.com/dav/`` - note that the trailing slash is significant (ref https://github.com/home-assistant/core/issues/66599)
@@ -323,7 +265,7 @@ private servers into tests/caldav_test_servers.yaml, see tests/caldav_test_serve
323
265
Niquests vs Requests vs HTTPX
324
266
=============================
325
267
326
-
By default, CalDAV depends on the niquests library. Some people are not happy with that, there exists fallbacks to utilize httpx and requests. See the :doc:`http-libraries` document.
268
+
By default, CalDAV depends on the niquests library. Some people are not happy with that, so there exists fallbacks to utilize httpx and requests. See the :doc:`http-libraries` document.
327
269
328
270
Documentation
329
271
=============
@@ -332,12 +274,12 @@ To build the documentation, install sphinx and run:
332
274
333
275
.. code-block:: bash
334
276
335
-
$ python setup.py build_sphinx
277
+
$ make html
336
278
337
279
Code of Conduct
338
280
===============
339
281
340
-
While I hope we never will need to refer to it, the `Contributor Covenant <https://www.contributor-covenant.org/version/2/1/code_of_conduct/>`_ applies to this project, see also `CODE_OF_CONDUCT <https://github.com/python-caldav/caldav/blob/master/CODE_OF_CONDUCT>`_. Avoid toxic negativity in general, but Tobias Brox can probably handle some blunt criticism if it may help getting the project on a better track.
282
+
While I hope we never will need to refer to it, the `Contributor Covenant <https://www.contributor-covenant.org/version/2/1/code_of_conduct/>`_ applies to this project, see also `CODE_OF_CONDUCT <https://github.com/python-caldav/caldav/blob/master/CODE_OF_CONDUCT>`_. Avoid toxic negativity in general, but the maintainer can handle some blunt criticism as long as it may help getting the project on a better track.
As of v3.x, **niquests** is used for HTTP communication. niquests is a backwards-compatible fork of the requests library. It's a modern HTTP library with support for HTTP/2 and HTTP/3 and many other things. However, it's a bit controversial, so I've decided to support some fallbacks.
4
+
As of v3.x, **niquests** is used for HTTP communication. niquests is a backwards-compatible fork of the requests library. It's a modern HTTP library with support for HTTP/2 and HTTP/3 and many other things. Due to popular demand, fallbacks to **requests** and **httpx** exists.
5
5
6
-
Historical context
7
-
------------------
6
+
Context
7
+
-------
8
8
9
9
There is also information in `GitHub issue #457 <https://github.com/python-caldav/caldav/issues/457>`_
10
10
11
-
I got in a pull request suggesting to replace the "good old" requests
12
-
libary with **niquests**. While development of the requests library
13
-
is more or less stagnant, niquests supports HTTP/2.0, HTTP/3.0, async
14
-
operations and a lot more. Just replacing `r` with `n` already
15
-
resolved several long-standing issues. I held back releasing this
16
-
change until v2.0. Short time after v2.0 was released, I got a
17
-
complaint from a package maintainer - he found the niquests dependency
18
-
to be unacceptable.
19
-
20
-
The niquests and urllib3-future packages seems to have started as
21
-
patches to the requests and urllib3 libraries, but was never accepted
22
-
by the maintainers. It may have been due to a "not invented
23
-
here"-syndrome, it may have been due to disagreements on design
24
-
decisions, it may have been due to personal conflicts - or, perhaps
25
-
the quality of the code was found not to be good enough. It works for
26
-
me. I've had Claude to do a code review of niquests and urllib3 - it
27
-
gave a thumbs-up for Niquests, while urllib3.future could benefit from
28
-
some refactoring.
29
-
30
-
I see some possible reasons why one would like to avoid niquests:
31
-
* Many projects are already dependent on requests and/or httpx, and one
32
-
may not want to drag in another HTTP-dependency.
33
-
* Some may argue that requests and httpx are safer options because
34
-
the code have had more eyeballs (This *is* true, but if everybody
35
-
thought "nobody ever got fired for choosing IBM/Microsoft", we'd
36
-
probably still be stuck with MS/Dos on floppy disks!).
37
-
* Ref `GitHub issue #530 <https://github.com/python-caldav/caldav/issues/530>`_ there is a concern is that the urllib3-future fork is messy (though, the urllib3 author denies this).
38
-
39
-
Fallbacks implemented
40
-
---------------------
41
-
42
-
I respect that people may have concerns, hence I've implemtened fallback logic:
43
-
44
-
* **Sync client**: Falls back to `requests` if niquests is not installed
45
-
* **Async client**: Falls back to `httpx` if niquests is not installed
46
-
47
-
This means all that is needed for getting the library to work without
48
-
dragging in the niquest dependency is to change the dependencies in
49
-
the `pyproject.toml` file.
50
-
51
-
If this is not possible for you for one reason or another (like, the project depends on pulling packages from pypi), please ask me gently (i.e. in `#530 <https://github.com/python-caldav/caldav/issues/530>`_) to release a patch-level version where niquests is an optional dependency.
52
-
53
-
HTTP/2 Support
54
-
--------------
55
-
56
-
While niquests supports HTTP/2 and HTTP/3 out of the box, the HTTP/2-support in httpx is considered a bit experimental and disabled by default. HTTP/2 will be enabled with httpx, if the optional ``h2`` package is installed.
57
-
58
-
Multiplexing problems
59
-
---------------------
60
-
61
-
Some servers (particularly the combination nginx with digest auth) does have compatibility issues with HTTP/2 multiplexing, so this is disabled by default. The CalDAV communication may potentially be speeded up a bit by enabling multiplexing. This is done in the CalDAV server configuration settings, by flagging that the feature `http.multiplexing` is supported.
11
+
Traditionally the CalDAV library only supported the traditional
12
+
**requests** library, but this library seems to be at a dead end,
13
+
version 2.0 went into "feature freeze" long ago, but version 3.0 never
14
+
materialized. It was suggested to replace it with **niquests**. Niquests (and urllib3-future) started as contributions to the upstream project, but the changes were rejected. Some research has been done before accepting niquests as a dependency in the CalDAV library.
15
+
16
+
Niquests is a fork, a drop-in replacement, and just replacing the "re"
17
+
with "ni" in the code solved three long-standing issues. The change
18
+
was left in the master branch for quite a while, and pushed out in the
19
+
2.0-release. Almost immediately after pushing niquests in 2.0,
20
+
a complaint was raised from a distro package maintainer who found
21
+
niquests unacceptable. Due to that the CalDAV library now has a
22
+
fallback implemented; it can use requests for sync communication.
23
+
24
+
For async communications (and also as a replacement for requests in
25
+
sync usage), **httpx** seems to have been the most popular library
26
+
candidate. However, niquests supports async communication. It was
27
+
decided to support both niquests and httpx for async communication.
the httpx development seems stagnant, and httpx is even flagged as a
32
+
supply-chain risk in some Reddit-discussions. It seems like the http
33
+
user space is filled with drama and intrigues.
34
+
35
+
Fallbacks
36
+
---------
37
+
38
+
To enable the fallbacks, just ensure the requests and/or httpx library is available and that niquests isn't available. In virtual environments, fix the dependencies in `pyproject.toml`.
39
+
40
+
Recommendations
41
+
---------------
42
+
43
+
* In general, stick to the package default - niquests.
44
+
* In a very sharp production environment, you may consider to use the
45
+
good old requests library, but set an appropriate timeout. Use the
46
+
sync code, do not use async as the async support is still a bit
47
+
experimental.
48
+
* If you're using the CalDAV library in a sync project that is already
49
+
heavily dependent on the requests library and don't want to drag in
50
+
extra dependencies, go for requests.
51
+
* If you're using the CalDAV library in an async project that is
52
+
already heavily dependent on httpx and don't want to drag in extra
53
+
dependencies, use httpx - but do your own due diligence.
54
+
* If you have strong personal opinions against niquests, then don't use it. Please share your thoughts at https://github.com/python-caldav/caldav/issues/611
55
+
56
+
Multiplexing
57
+
------------
58
+
59
+
The niquests library supports multiplexing.
60
+
61
+
A compatibility issue with HTTP/2 multiplexing was found when running nginx with digest auth, so this is disabled by default. The CalDAV communication may potentially be speeded up a bit by enabling multiplexing. This is done in the CalDAV server configuration settings, by flagging that the feature `http.multiplexing` is supported.
0 commit comments