Skip to content

Commit a4fd720

Browse files
authored
Canonical RFC links + misc
Usage of canonical RFC-links and :rfc:-references in the documentation. Fixes #635 Added a missing v3-migration documentation and some other minor docfixes.
1 parent bf69793 commit a4fd720

14 files changed

Lines changed: 584 additions & 75 deletions

AI-POLICY.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Read this first
44

5-
The most important rule: Inform about it!
5+
The most important rule: Be honest and inform about it!
66

77
If you've spent hours, perhaps a full day of your time writing up a
88
pull request, then I sort of owe you something. I should spend some
@@ -13,17 +13,15 @@ is pulling the project in the wrong direction. A human being have
1313
feelings, I should be careful not to hurt your feelings.
1414

1515
At the other hand, perhaps you've spent 30 seconds either doing `ruff
16-
check --fix ; gh pr create` or telling Claude to check what went wrong
17-
in the logs and submit a bugfix upstream. Do I still owe
18-
you to spend time looking through the submission carefully and
19-
spending time being polite and caring about your feelings?
16+
check --fix ; gh pr create` or telling Claude "Please fix support for
17+
Microsoft Exchange and create a pull request". Do I still owe you to
18+
spend time looking through the submission carefully and spending time
19+
being polite and caring about your feelings?
2020

2121
Perhaps your pull request is just one out of many such "drive-by pull
2222
requests". It doesn't scale for a maintainer to spent lots of time on
23-
each such pull request. I should just accept or decline such requests
24-
rapidly with minimum effort.
25-
26-
So it all boils down to this: Be honest about tool usage!
23+
each such pull request. At least, I should not waste time trying to
24+
explain in details why I'm rejecting the pull request.
2725

2826
## Bugfixes are (most often) welcome
2927

@@ -52,21 +50,20 @@ changes.
5250
handle), so it would be nice if you understand the change you're
5351
proposing.
5452

55-
* **Transparency** is important. I don't care about your full
56-
tool-chain, but if a significant part of the value in the pull
57-
request was generated by tools, then it's relevant. Do not write "I
58-
found this issue and here is a fix", but rather "I ran the ruff tool
59-
on the code, found this issue, and here is the fix". If the AI was
60-
fixing a bug for you, then write in the pull request that "this code
61-
was AI-generated and haven't been thoroughly reviewed by me".
62-
Commit message should end with "Assisted-by: (name of tool)",
63-
alternatively i.e. `Co-Authored-By: Claude <noreply@anthropic.com>`
53+
* **Transparency** is important. If a significant part of the value
54+
in the pull request was generated by tools, then it's relevant. Do
55+
not write "I found this issue and here is a fix", but rather "I ran
56+
the ruff tool on the code, it found this issue, and here is the
57+
fix". If the AI was fixing a bug for you, then write in the pull
58+
request that "this bugfix was vibed up, I have no idea what the AI
59+
has done here". End the commit message with "Assisted-By: ..." or
60+
"Co-Authored-By: ...".
6461

6562
* **YOU** should be ready to follow up and respond to feedback and
6663
questions on the contribution. If you're letting the AI do this for
67-
you, then you're neither honest nor adding value to the project.
68-
You should at least do a quick QA on the AI-answer and acknowledge
69-
that it was generated by the AI.
64+
you on your behalf, then it's a chance you're neither honest nor
65+
adding value to the project. You should at least do a quick QA on
66+
the AI-answer and acknowledge that it was generated by the AI.
7067

7168
* The Contributors Guidelines aren't strongly enforced on this project
7269
as of 2026-02, and I can hardly see cases where the AI would break

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributions are mostly welcome. If the length of this text scares you, then I
44

55
## Usage of AI and other tools
66

7-
A separate [AI POLICY](AI-POLICY.md) has been made. The gist of it, be transparent and inform if your contribution was a result of clever tool usage and/or AI-usage, don't submit code if you don't understand the code yourself, and you are supposed to contribute value to the project. If you're too lazy to read the AI Policy, then at least have a chat with the AI to work out if your contribution is within the policy or not.
7+
A separate [AI POLICY](AI-POLICY.md) has been made. If you want to use AI and you're too lazy to read the AI Policy, then at least ask the AI to read it and chat with it to work out if your contribution is within the policy or not.
88

99
## GitHub
1010

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# caldav
22

3-
This project is a CalDAV ([RFC4791](http://www.ietf.org/rfc/rfc4791.txt)) client library for Python.
3+
This project is a CalDAV ([RFC4791](https://datatracker.ietf.org/doc/html/rfc4791)) client library for Python.
44

55
Features:
66

caldav/calendarobjectresource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,15 +595,15 @@ def add_attendee(self, attendee, no_default_parameters: bool = False, **paramete
595595
def is_invite_request(self) -> bool:
596596
"""
597597
Returns True if this object is a request, see
598-
https://www.rfc-editor.org/rfc/rfc2446.html#section-3.2.2
598+
:rfc:`2446#section-3.2.2`.
599599
"""
600600
self.load(only_if_unloaded=True)
601601
return self.icalendar_instance.get("method", None) == "REQUEST"
602602

603603
def is_invite_reply(self) -> bool:
604604
"""
605605
Returns True if the object is a reply, see
606-
https://www.rfc-editor.org/rfc/rfc2446.html#section-3.2.3
606+
:rfc:`2446#section-3.2.3`.
607607
"""
608608
self.load(only_if_unloaded=True)
609609
return self.icalendar_instance.get("method", None) == "REPLY"

caldav/collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ class Calendar(DAVObject):
528528
"""
529529
The `Calendar` object is used to represent a calendar collection.
530530
Refer to the RFC for details:
531-
https://tools.ietf.org/html/rfc4791#section-5.3.1
531+
:rfc:`4791#section-5.3.1`.
532532
"""
533533

534534
def __init__(

caldav/elements/cdav.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class TimeRange(BaseElement):
103103

104104
def __init__(self, start: datetime | None = None, end: datetime | None = None) -> None:
105105
## start and end should be an icalendar "date with UTC time",
106-
## ref https://tools.ietf.org/html/rfc4791#section-9.9
106+
## ref https://datatracker.ietf.org/doc/html/rfc4791#section-9.9
107107
super(TimeRange, self).__init__()
108108

109109
if self.attributes is None:

docs/design/FEATURE_COMPLETE_ROADMAP.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This roadmap covers the **remaining gaps** to achieve full RFC compliance and ad
2929

3030
**Priority:** High
3131
**Estimated effort:** 40-60 hours
32-
**RFC:** [RFC 3744](https://www.rfc-editor.org/rfc/rfc3744)
32+
**RFC:** [RFC 3744](https://datatracker.ietf.org/doc/html/rfc3744)
3333

3434
Current state: The library has basic principal support but lacks ACL manipulation.
3535

@@ -50,7 +50,7 @@ Current state: The library has basic principal support but lacks ACL manipulatio
5050

5151
**Priority:** High
5252
**Estimated effort:** 40 hours (partially covered in #599 for v3.2)
53-
**RFC:** [RFC 6638](https://www.rfc-editor.org/rfc/rfc6638)
53+
**RFC:** [RFC 6638](https://datatracker.ietf.org/doc/html/rfc6638)
5454

5555
The v3.2 roadmap covers basic scheduling improvements. Additional work for full compliance:
5656

@@ -71,7 +71,7 @@ The v3.2 roadmap covers basic scheduling improvements. Additional work for full
7171

7272
**Priority:** Medium
7373
**Estimated effort:** 16-24 hours
74-
**RFC:** [RFC 7953](https://www.rfc-editor.org/rfc/rfc7953)
74+
**RFC:** [RFC 7953](https://datatracker.ietf.org/doc/html/rfc7953)
7575
**Related issue:** #425
7676

7777
**Tasks:**
@@ -88,7 +88,7 @@ The v3.2 roadmap covers basic scheduling improvements. Additional work for full
8888

8989
**Priority:** Medium
9090
**Estimated effort:** 8-12 hours
91-
**RFC:** [RFC 7986](https://www.rfc-editor.org/rfc/rfc7986)
91+
**RFC:** [RFC 7986](https://datatracker.ietf.org/doc/html/rfc7986)
9292

9393
**Tasks:**
9494
- [ ] Support calendar-level properties: `NAME`, `DESCRIPTION`, `COLOR`, `REFRESH-INTERVAL`, `SOURCE`
@@ -148,7 +148,7 @@ The v3.2 roadmap covers basic scheduling improvements. Additional work for full
148148

149149
**Priority:** Low
150150
**Estimated effort:** 24-32 hours
151-
**RFC:** [RFC 8607](https://www.rfc-editor.org/rfc/rfc8607)
151+
**RFC:** [RFC 8607](https://datatracker.ietf.org/doc/html/rfc8607)
152152

153153
**Tasks:**
154154
- [ ] Detect server support for `calendar-managed-attachments`
@@ -181,7 +181,7 @@ Note: This is a draft standard but widely implemented by major servers.
181181

182182
**Priority:** Low
183183
**Estimated effort:** 4-8 hours
184-
**RFC:** [RFC 5689](https://www.rfc-editor.org/rfc/rfc5689)
184+
**RFC:** [RFC 5689](https://datatracker.ietf.org/doc/html/rfc5689)
185185

186186
**Tasks:**
187187
- [ ] Support extended MKCOL as alternative to MKCALENDAR
@@ -194,7 +194,7 @@ Note: This is a draft standard but widely implemented by major servers.
194194

195195
**Priority:** Low
196196
**Estimated effort:** 4-8 hours
197-
**RFC:** [RFC 4331](https://www.rfc-editor.org/rfc/rfc4331)
197+
**RFC:** [RFC 4331](https://datatracker.ietf.org/doc/html/rfc4331)
198198

199199
**Tasks:**
200200
- [ ] Add `calendar.get_quota()` method
@@ -270,7 +270,7 @@ Note: This is a draft standard but widely implemented by major servers.
270270
**Priority:** Medium
271271
**Estimated effort:** 16-24 hours
272272
**Related issue:** #571
273-
**RFC:** [RFC 6764 Section 8](https://www.rfc-editor.org/rfc/rfc6764#section-8)
273+
**RFC:** [RFC 6764 Section 8](https://datatracker.ietf.org/doc/html/rfc6764#section-8)
274274

275275
**Tasks:**
276276
- [ ] Add optional DNSSEC validation for SRV/TXT lookups
@@ -301,7 +301,7 @@ Note: This is a draft standard but widely implemented by major servers.
301301

302302
**Priority:** Low
303303
**Estimated effort:** 16-24 hours
304-
**RFC:** [RFC 7265](https://www.rfc-editor.org/rfc/rfc7265)
304+
**RFC:** [RFC 7265](https://datatracker.ietf.org/doc/html/rfc7265)
305305

306306
**Tasks:**
307307
- [ ] Accept `application/calendar+json` responses
@@ -314,7 +314,7 @@ Note: This is a draft standard but widely implemented by major servers.
314314

315315
**Priority:** Low
316316
**Estimated effort:** 16-24 hours
317-
**RFC:** [RFC 6321](https://www.rfc-editor.org/rfc/rfc6321)
317+
**RFC:** [RFC 6321](https://datatracker.ietf.org/doc/html/rfc6321)
318318

319319
**Tasks:**
320320
- [ ] Accept `application/calendar+xml` responses
@@ -488,23 +488,23 @@ Based on the roadmap, suggested version milestones after v3.2:
488488
## References
489489

490490
### Core Standards
491-
- [RFC 4791 - CalDAV](https://www.rfc-editor.org/rfc/rfc4791)
492-
- [RFC 6638 - CalDAV Scheduling](https://www.rfc-editor.org/rfc/rfc6638)
493-
- [RFC 4918 - WebDAV](https://www.rfc-editor.org/rfc/rfc4918)
494-
- [RFC 3744 - WebDAV ACL](https://www.rfc-editor.org/rfc/rfc3744)
495-
- [RFC 5545 - iCalendar](https://www.rfc-editor.org/rfc/rfc5545)
491+
- [RFC 4791 - CalDAV](https://datatracker.ietf.org/doc/html/rfc4791)
492+
- [RFC 6638 - CalDAV Scheduling](https://datatracker.ietf.org/doc/html/rfc6638)
493+
- [RFC 4918 - WebDAV](https://datatracker.ietf.org/doc/html/rfc4918)
494+
- [RFC 3744 - WebDAV ACL](https://datatracker.ietf.org/doc/html/rfc3744)
495+
- [RFC 5545 - iCalendar](https://datatracker.ietf.org/doc/html/rfc5545)
496496

497497
### Extensions
498-
- [RFC 6764 - Service Discovery](https://www.rfc-editor.org/rfc/rfc6764)
499-
- [RFC 6578 - WebDAV Sync](https://www.rfc-editor.org/rfc/rfc6578)
500-
- [RFC 7953 - Calendar Availability](https://www.rfc-editor.org/rfc/rfc7953)
501-
- [RFC 7986 - New iCalendar Properties](https://www.rfc-editor.org/rfc/rfc7986)
502-
- [RFC 8607 - Managed Attachments](https://www.rfc-editor.org/rfc/rfc8607)
498+
- [RFC 6764 - Service Discovery](https://datatracker.ietf.org/doc/html/rfc6764)
499+
- [RFC 6578 - WebDAV Sync](https://datatracker.ietf.org/doc/html/rfc6578)
500+
- [RFC 7953 - Calendar Availability](https://datatracker.ietf.org/doc/html/rfc7953)
501+
- [RFC 7986 - New iCalendar Properties](https://datatracker.ietf.org/doc/html/rfc7986)
502+
- [RFC 8607 - Managed Attachments](https://datatracker.ietf.org/doc/html/rfc8607)
503503

504504
### Related
505-
- [RFC 5546 - iTIP](https://www.rfc-editor.org/rfc/rfc5546)
506-
- [RFC 6321 - xCal](https://www.rfc-editor.org/rfc/rfc6321)
507-
- [RFC 7265 - jCal](https://www.rfc-editor.org/rfc/rfc7265)
505+
- [RFC 5546 - iTIP](https://datatracker.ietf.org/doc/html/rfc5546)
506+
- [RFC 6321 - xCal](https://datatracker.ietf.org/doc/html/rfc6321)
507+
- [RFC 7265 - jCal](https://datatracker.ietf.org/doc/html/rfc7265)
508508
- [CalConnect Developer Guide](https://devguide.calconnect.org/)
509509

510510
---

docs/source/about.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,40 +65,40 @@ Support for Python2 was officially not supported starting from caldav
6565
version 1.0.
6666

6767

68-
RFC 4791, 2518, 5545, 6638 et al
69-
--------------------------------
68+
RFC compliance
69+
--------------
7070

71-
RFC 4791 (CalDAV) outlines the standard way of communicating with a
72-
calendar server. RFC 4791 is an extension of RFC 4918 (WebDAV). The
73-
scope of this library is basically to cover RFC 4791/4918, the actual
71+
:rfc:`4791` (CalDAV) outlines the standard way of communicating with a
72+
calendar server. :rfc:`4791` is an extension of :rfc:`4918` (WebDAV). The
73+
scope of this library is basically to cover :rfc:`4791` and :rfc:`4918`, the actual
7474
communication with the caldav server. (The WebDAV standard also has
7575
quite some extensions, this library supports some of the relevant
7676
extensions as well).
7777

78-
There exists another library webdavclient3 for handling RFC 4918
78+
There exists another library webdavclient3 for handling :rfc:`4918`
7979
(WebDAV), ideally we should be depending on it rather than overlap it.
8080

81-
RFC 6638/RFC 6047 is extending the CalDAV and iCalendar protocols for
82-
scheduling purposes, work is in progress to support RFC 6638. Support
83-
for RFC 6047 is considered mostly outside the scope of this library,
81+
:rfc:`6638` and :rfc:`6047` extend the CalDAV and iCalendar protocols for
82+
scheduling purposes, work is in progress to support :rfc:`6638`. Support
83+
for :rfc:`6047` is considered mostly outside the scope of this library,
8484
though for convenience this library may contain methods like accept()
8585
on a calendar invite (which involves fetching the invite from the
8686
server, editing the calendar data and putting it to the server).
8787

8888
This library should make it trivial to fetch an event, modify the data
8989
and save it back to the server - but to do that it's also needed to
90-
support RFC 5545 (icalendar). It's outside the scope of this library
91-
to implement logic for parsing and modifying RFC 5545, instead we
90+
support :rfc:`5545` (icalendar). It's outside the scope of this library
91+
to implement logic for parsing and modifying :rfc:`5545`, instead we
9292
depend on another library for that.
9393

94-
RFC 5545 describes the icalendar format. Constructing or parsing
94+
:rfc:`5545` describes the icalendar format. Constructing or parsing
9595
icalendar data was considered out of the scope of this library, but we
9696
do make exceptions - like, there is a method to complete a task - it
9797
involves editing the icalendar data, and now the ``add_event``,
9898
``add_todo`` and ``add_journal`` methods are able to construct icalendar
9999
data if needed.
100100

101-
There exists two libraries supporting RFC 5545, vobject and icalendar.
101+
There exists two libraries supporting :rfc:`5545`, vobject and icalendar.
102102
vobject was unmaintained for several years, but seems to be actively
103103
maintained now. The caldav library originally came with vobject
104104
support, but as many people requested the vobject dependency to be
@@ -109,7 +109,7 @@ Misbehaving server implementations
109109
----------------------------------
110110

111111
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
112+
doesn't implement all of :rfc:`4791`, breaks the standard a bit, or has
113113
extra features. As long as it doesn't add too much complexity to the
114114
code, hacks and workarounds for "badly behaving caldav servers" are
115115
considered to be within the scope. Ideally, users of the caldav
@@ -253,7 +253,7 @@ Server-specific highlights
253253
VTODOs must be stored in a calendar explicitly created for the ``VTODO``
254254
component type.
255255

256-
* **Calendar creation** is not mandatory under RFC 4791. Most self-hosted
256+
* **Calendar creation** is not mandatory under :rfc:`4791`. Most self-hosted
257257
servers support it; Google's CalDAV adapter does not.
258258

259259
* **Recurring events and tasks** are non-trivial to implement correctly on
@@ -263,7 +263,7 @@ Server-specific highlights
263263
Some notes on CalDAV URLs
264264
=========================
265265

266-
From v2.1, well-known URLs were hard-coded into the compatibility_hints. As of v2.2, auto-detection based on RFC6764 is supported. This protocol is widely used. For servers supporting it, it's sufficient to add something like "demo2.nextcloud.com" in the URL. For well-known calendar providers, it's not needed to enter anything in the URL, it suffices to put i.e. `features="ecloud"` into the connection parameters.
266+
From v2.1, well-known URLs were hard-coded into the compatibility_hints. As of v2.2, auto-detection based on :rfc:`6764` is supported. This protocol is widely used. For servers supporting it, it's sufficient to add something like "demo2.nextcloud.com" in the URL. For well-known calendar providers, it's not needed to enter anything in the URL, it suffices to put i.e. `features="ecloud"` into the connection parameters.
267267

268268
CalDAV URLs can be quite confusing, some software requires the URL to the calendar, other requires the URL to the principal. The Python CalDAV library does support accessing calendars and principals using such URLs, but the recommended practice is to configure up the CalDAV root URL and tell the library to find the principal and calendars from that. Typical examples of CalDAV URLs:
269269

docs/source/async.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The ``caldav.aio`` module exports:
5757
* ``AsyncCalendarSet`` - Collection of calendars
5858
* ``AsyncPrincipal`` - User principal
5959

60-
**Scheduling (RFC6638):**
60+
**Scheduling (:rfc:`6638`):**
6161

6262
* ``AsyncScheduleInbox`` - Incoming invitations
6363
* ``AsyncScheduleOutbox`` - Outgoing invitations

docs/source/jmap.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ JMAP
55
**The JMAP support in v3.0 is experimental, the API may change in v3.1 of the library**
66

77
The caldav library includes a JMAP client for servers that speak
8-
`RFC 8620 <https://www.rfc-editor.org/rfc/rfc8620>`_ (JMAP Core) and
8+
:rfc:`8620` (JMAP Core) and
99
the JMAP Calendars protocol (``urn:ietf:params:jmap:calendars``), which uses
10-
`RFC 8984 <https://www.rfc-editor.org/rfc/rfc8984>`_ (JSCalendar) as its data format.
10+
:rfc:`8984` (JSCalendar) as its data format.
1111
It covers calendar listing, event CRUD, incremental sync, and task CRUD — the same
1212
operations as the CalDAV client — so the choice of protocol comes down to what the
1313
server supports.
@@ -361,7 +361,7 @@ The three specific error classes:
361361
* :class:`~caldav.jmap.error.JMAPCapabilityError` — the server's Session object
362362
does not advertise ``urn:ietf:params:jmap:calendars``.
363363
* :class:`~caldav.jmap.error.JMAPMethodError` — a JMAP method call returned an error
364-
response. The ``error_type`` attribute holds the RFC 8620 error type string
364+
response. The ``error_type`` attribute holds the :rfc:`8620` error type string
365365
(e.g. ``"invalidArguments"``, ``"notFound"``, ``"stateMismatch"``).
366366

367367
Configuration File

0 commit comments

Comments
 (0)