-
Notifications
You must be signed in to change notification settings - Fork 91
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
API changes in version 2.0? #92
Comments
Gives a new propery calendar_item.icalendar_instance. The .instance property will still give a vobject, and icalendar is not listed as a requirement yet - icalendar module will be imported late, when needed. In version 1.0, probably this will be reversed, with vobject being an optional dependency and icalendar being used internally. This commit also changes the way data is stored, the new logic ensures data is stored authoratively either in _data, _vobject_instance or _icalendar_instance. So, mess up .e. with event.vobject_instance.vevent.due.value and it will be refleted in event.data. It wasn't so earlier, but during the save operation, the instance would be given priority. Resolves #1 - references #97 #92 #3 and #28
SEMVER states ...
All three points apply, hence a 1.0-release is way overdue. New tentative road map:
@cyrilrbt do you have any opinions? |
It's always been my intention to align with semver so let's go for it! |
* ref #92 (comment) I've decided to bump the version number to 1.0 - that's way overdue * Documentation (including comments and docstrings) reflecting version 1.0-release and deprecation policy * docstring: TODO-comment marking that an old method should be revised * mostly docfixes in this commit - but also includes a minor refactoring in test configuration, rewritten basic_examples almost from scratch (and tested it)
Creating a new issue to keep track of changes to be considered for an upcoming 1.0-release. This top entry will be edited to reflect all significant changes planned.
Backward compatibility plan
I would like users to be able to upgrade to 1.0 without changing anything, if possible (though, hacks to support usage patterns from 0.5 and earlier may be dropped in 1.0). When version 2.0 comes, all hacks to support backward-compatibility with 1.x will be removed. My suggestion is that the proper usage of 1.0 is to start with something this:
and then everything should be doable starting with the objects
client
orprincipal
. In version 2.0,caldav/caldav/__init__.py
will be trimmed to only reveal the CalDAVClient. All operations starting with CalDAVClient will results in objects/classes supporting the 1.0-API. For the classes where the API is changed, we'll create a new class with a class name ending with "NG" (new generation), inheritate the old class, and do the needed changes. In version 2.0 we'll refactor and remove the NG-cruft.In 1.0, DAVClient will be a class for backward-compatibility with version 0.x. In version 2.0 we should consider to split out DAV-support to a separate davclient-module.
API Changes
some_obj.instance
is deprecated, new methodssome_obj.icalendar_instance
andsome_obj.vobject_instance
(as well assome_obj.icalendar_component
)principal.get_calendar()
,client.get_principal()
, etc. Properties should probably never cause any communication towards the calendar server. Access of properties should probably never cause side effects (the current instance and data properties may have side effects).The text was updated successfully, but these errors were encountered: