-
Notifications
You must be signed in to change notification settings - Fork 98
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 and 3.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)
It may be needed with a 2.0-release relatively soon due to pull request #437. |
Creating a new issue to keep track of changes to be considered for upcoming major-releases. This top entry will be edited to reflect all significant changes planned.
Version 1, 2, 3, ...
Version 1.0 was released mostly because a 1.0-release was "long overdue". Some few things were deprecated, and Python 2 was officially not supported anymore.
Version 2.0 will be released to unsupport python 3.7 (and possibly python 3.8). Some thoughts should be made on weather we'd like to deprecate older parts of the API while doing so. Things that are already deprecated should be gutted away.
I've long had an idea to do a major rewrite of the API, possibly that will be done in 3.0.
Backward compatibility plan
Generally, anything that is not deprecated in major verson
(x-1)
should still work in versionx
.I'm considering a major overhaul of the API, assumed to happen in version 3.0. My suggestion is that the proper usage of 3.0 is to start with something like this:
and then everything should be doable starting with the objects
client
orprincipal
. In version 3.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 2.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 4.0 we'll refactor and remove the NG-cruft.In 3.0, DAVClient will be a class for backward-compatibility with version 2.x. In version 4.0 we should consider to split out DAV-support to a separate davclient-module.
API Changes
some_obj.instance
is deprecated in v1.0, new methodssome_obj.icalendar_instance
andsome_obj.vobject_instance
(as well assome_obj.icalendar_component
). Will be dropped in v2.0principal.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: