The generator should give the option not to automatically add the interface to Connection _interfaces set. This way we could implement feature but enable them when we know that it's supported (right before we reach CONNECTED state). See MailNotification in butterfly for a example use-case.
You could just not call ConnectionInterfaceMailNotification.__init__ until you do indeed want the interface to be added? Python is fine with this, unlike other languages. Thoughts?
I guess it could work. It's just very odd in object oriented language to use a constructor like this. Also I don't know what will happen with dbus.service.Interface constructor. Other CM do implement interfaces and add/remove the interface name from the list of interfaces contained in Connection object. I thought it was better to avoid doing it differently in Butterfly.
Please have a look at mail_notification.py line 69. If you do or not feel annoyed by this patch, please comment. If nobody feels annoyed, we will just remove the fixme and close this bug.
Ok, after *long* discussing with lfrb on IRC, we should just drop the FIXME. The code has no known issue, so why should be care :)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.