-
Notifications
You must be signed in to change notification settings - Fork 112
Canonical RFC links + misc #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -595,15 +595,15 @@ def add_attendee(self, attendee, no_default_parameters: bool = False, **paramete | |||||
| def is_invite_request(self) -> bool: | ||||||
| """ | ||||||
| Returns True if this object is a request, see | ||||||
| https://www.rfc-editor.org/rfc/rfc2446.html#section-3.2.2 | ||||||
| https://datatracker.ietf.org/doc/html/rfc2446#section-3.2.2 | ||||||
| """ | ||||||
| self.load(only_if_unloaded=True) | ||||||
| return self.icalendar_instance.get("method", None) == "REQUEST" | ||||||
|
|
||||||
| def is_invite_reply(self) -> bool: | ||||||
| """ | ||||||
| Returns True if the object is a reply, see | ||||||
| https://www.rfc-editor.org/rfc/rfc2446.html#section-3.2.3 | ||||||
| https://datatracker.ietf.org/doc/html/rfc2446#section-3.2.3 | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| """ | ||||||
| self.load(only_if_unloaded=True) | ||||||
| return self.icalendar_instance.get("method", None) == "REPLY" | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -528,7 +528,7 @@ class Calendar(DAVObject): | |||||
| """ | ||||||
| The `Calendar` object is used to represent a calendar collection. | ||||||
| Refer to the RFC for details: | ||||||
| https://tools.ietf.org/html/rfc4791#section-5.3.1 | ||||||
| https://datatracker.ietf.org/doc/html/rfc4791#section-5.3.1 | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://caldav.readthedocs.io/latest/caldav/collection.html#caldav.collection.Calendar
Suggested change
|
||||||
| """ | ||||||
|
|
||||||
| def __init__( | ||||||
|
|
||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know whether you include this file in the docs. It appears to be a TODO list. If so, then this is good, otherwise let me know and we should use the reStructuredText syntax instead. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -65,40 +65,40 @@ Support for Python2 was officially not supported starting from caldav | |||||
| version 1.0. | ||||||
|
|
||||||
|
|
||||||
| RFC 4791, 2518, 5545, 6638 et al | ||||||
| -------------------------------- | ||||||
| :rfc:`4791`, 2518, 5545, 6638 et al | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd just make this heading generic. Also headings should not have links in them.
Suggested change
|
||||||
| ------------------------------------ | ||||||
|
|
||||||
| RFC 4791 (CalDAV) outlines the standard way of communicating with a | ||||||
| calendar server. RFC 4791 is an extension of RFC 4918 (WebDAV). The | ||||||
| scope of this library is basically to cover RFC 4791/4918, the actual | ||||||
| :rfc:`4791` (CalDAV) outlines the standard way of communicating with a | ||||||
| calendar server. :rfc:`4791` is an extension of :rfc:`4918` (WebDAV). The | ||||||
| scope of this library is basically to cover :rfc:`4791`/:rfc:`4918`, the actual | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that the rst link syntax won't work without spaces. Haven't checked. In any case, this is grammatically correct.
Suggested change
|
||||||
| communication with the caldav server. (The WebDAV standard also has | ||||||
| quite some extensions, this library supports some of the relevant | ||||||
| extensions as well). | ||||||
|
|
||||||
| There exists another library webdavclient3 for handling RFC 4918 | ||||||
| There exists another library webdavclient3 for handling :rfc:`4918` | ||||||
| (WebDAV), ideally we should be depending on it rather than overlap it. | ||||||
|
|
||||||
| RFC 6638/RFC 6047 is extending the CalDAV and iCalendar protocols for | ||||||
| scheduling purposes, work is in progress to support RFC 6638. Support | ||||||
| for RFC 6047 is considered mostly outside the scope of this library, | ||||||
| :rfc:`6638`/:rfc:`6047` is extending the CalDAV and iCalendar protocols for | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| scheduling purposes, work is in progress to support :rfc:`6638`. Support | ||||||
| for :rfc:`6047` is considered mostly outside the scope of this library, | ||||||
| though for convenience this library may contain methods like accept() | ||||||
| on a calendar invite (which involves fetching the invite from the | ||||||
| server, editing the calendar data and putting it to the server). | ||||||
|
|
||||||
| This library should make it trivial to fetch an event, modify the data | ||||||
| and save it back to the server - but to do that it's also needed to | ||||||
| support RFC 5545 (icalendar). It's outside the scope of this library | ||||||
| to implement logic for parsing and modifying RFC 5545, instead we | ||||||
| support :rfc:`5545` (icalendar). It's outside the scope of this library | ||||||
| to implement logic for parsing and modifying :rfc:`5545`, instead we | ||||||
| depend on another library for that. | ||||||
|
|
||||||
| RFC 5545 describes the icalendar format. Constructing or parsing | ||||||
| :rfc:`5545` describes the icalendar format. Constructing or parsing | ||||||
| icalendar data was considered out of the scope of this library, but we | ||||||
| do make exceptions - like, there is a method to complete a task - it | ||||||
| involves editing the icalendar data, and now the ``add_event``, | ||||||
| ``add_todo`` and ``add_journal`` methods are able to construct icalendar | ||||||
| data if needed. | ||||||
|
|
||||||
| There exists two libraries supporting RFC 5545, vobject and icalendar. | ||||||
| There exists two libraries supporting :rfc:`5545`, vobject and icalendar. | ||||||
| vobject was unmaintained for several years, but seems to be actively | ||||||
| maintained now. The caldav library originally came with vobject | ||||||
| support, but as many people requested the vobject dependency to be | ||||||
|
|
@@ -109,7 +109,7 @@ Misbehaving server implementations | |||||
| ---------------------------------- | ||||||
|
|
||||||
| Some server implementations may have some "caldav"-support that either | ||||||
| doesn't implement all of RFC 4791, breaks the standard a bit, or has | ||||||
| doesn't implement all of :rfc:`4791`, breaks the standard a bit, or has | ||||||
| extra features. As long as it doesn't add too much complexity to the | ||||||
| code, hacks and workarounds for "badly behaving caldav servers" are | ||||||
| considered to be within the scope. Ideally, users of the caldav | ||||||
|
|
@@ -253,7 +253,7 @@ Server-specific highlights | |||||
| VTODOs must be stored in a calendar explicitly created for the ``VTODO`` | ||||||
| component type. | ||||||
|
|
||||||
| * **Calendar creation** is not mandatory under RFC 4791. Most self-hosted | ||||||
| * **Calendar creation** is not mandatory under :rfc:`4791`. Most self-hosted | ||||||
| servers support it; Google's CalDAV adapter does not. | ||||||
|
|
||||||
| * **Recurring events and tasks** are non-trivial to implement correctly on | ||||||
|
|
@@ -263,7 +263,7 @@ Server-specific highlights | |||||
| Some notes on CalDAV URLs | ||||||
| ========================= | ||||||
|
|
||||||
| 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. | ||||||
| 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. | ||||||
|
|
||||||
| 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: | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make these pretty in the API docs. See https://caldav.readthedocs.io/latest/caldav/calendarobjectresource.html#caldav.calendarobjectresource.CalendarObjectResource.is_invite_request for example.