python-caldav / caldav

Apache License 2.0
316 stars 94 forks source link

Create an CalendarObjectResource.icalendar_component property #232

Open tobixen opened 1 year ago

tobixen commented 1 year ago

We have the event.icalendar_instance property, but then we also have a event.icalendar_object() method which returns the (sub)component of the icalendar instance. This is quite inconsistent and confusing.

RFC 5545 is consistently using the phrasing "component", and never "subcomponent". I think the proper name for the latter is event.icalendar_component - and for the sake of consistency, it should be a property, not a method. (however, event.icalendar_object needs to persist for quite some years yet for backward compatibility reasons).

tobixen commented 1 year ago

Actually, icalendar_object was named _icalendar_object in v0.10, hence we don't need to worry about backward compatibility. The icalendar_component-property will be released in v0.11, but documentation needs to be fixed before the issue can be closed. Should also take a look through the example code and see if it can be used there.

tobixen commented 1 year ago

I'll make a separate issue for the doc with a better description.