Giter Club home page Giter Club logo

Comments (5)

tobixen avatar tobixen commented on July 28, 2024

I'm against any changes breaking backward compatibility

from caldav.

dz0 avatar dz0 commented on July 28, 2024

from caldav.

tobixen avatar tobixen commented on July 28, 2024

Maybe the method can be renamed, but a "deprecated" alias can be preserved for backward-compatibility?

from caldav.

tobixen avatar tobixen commented on July 28, 2024

I've thought a bit on it, and decided to:

  • Rename the add_* to save_*, with aliases for backwards compatibility. The aliases may be removed when 1.0 is released
  • Add an attribute "no_overwrite" to the save_*-methods, defaults to False. If it's True, we'll do a lookup for any existing calendar item with the same uid, and raise an error if it already exists.
  • Add an attribute "no_create" to the save_*-methods, defaults to False. If it's True, we'll do a lookup for any existing calendar item with the same uid, and raise an error if it doesn't already exist.
  • Also, raise an error if both no_create and no_overwrite is set to True, as this combination is invalid.

Requires some test code as well ... probably won't get around to fix this today.

from caldav.

tobixen avatar tobixen commented on July 28, 2024

I decided to skip the point "raise an error if both no_create and no_overwrite is set to True, as this combination is invalid". It will pass if no object is given, and otherwise anyway give an error message. I should exercise it in the tests though ...

from caldav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.