[Calendarserver-discuss] imip-agent 0.2 (iMIP capabilities for mail servers)

Paul Boddie paul at boddie.org.uk
Mon Feb 13 23:02:35 UTC 2017


On Tuesday 31. January 2017 13.54.41 Jonas Smedegaard wrote:
> Quoting Paul Boddie (2017-01-31 13:29:15)
> > On Friday 27. January 2017 16.36.43 Jonas Smedegaard wrote:
> > > 
> > > Perhaps look at how Radicale handles plugins: It seems to me that it
> > > supports _either_ probing (touching multiple files - although here
> > > with only "files" and "SQL" I cannot imagine it being very
> > > expensive) or explicitly declared choice.
> > 
> > Well, Radicale's plug-in mechanism, which was the other problem, uses
> > Python's __import__ built-in. I'm not really a big fan of that, but if
> > there's no other acceptable alternative, I guess I could use something
> > similar.
> 
> I do not reject your current approach - only questioned if possibly
> (read: agreeable to your programming style) to do it more elegantly.

I think that __import__ (or actually importlib.import_module) is the way to go 
here, and I've now changed both the storage and scheduling extension 
mechanisms to use it instead:

http://hgweb.boddie.org.uk/imip-agent/rev/d2c6bd93269a

This means that I can remove some tools that otherwise need to be run, and so 
things become a bit simpler. It also removes the mutable already-installed 
file problem, too.

I guess I'll try and make a release fairly soon just to provide a well-defined 
output for you to look at again.

As always, thanks for the feedback!

Paul



More information about the Calendarserver-discuss mailing list