[Twisted-Python] INCOMPATIBLE CHANGE: Adding "parent" as a required attribute to IService

Glyph glyph at twistedmatrix.com
Thu Jun 4 12:48:03 MDT 2015


> On Jun 3, 2015, at 10:23 PM, Moshe Zadka <zadka.moshe at gmail.com> wrote:
> 
> IService's docstrings obliquely referred to a "parent" attribute, but have not actually specified its type or existence. This change makes this attribute mandatory. It also makes the existence of the other IService attributes, running and name, enforced by verifyObject.
> 
> The ticket is available here: https://twistedmatrix.com/trac/ticket/7922 <https://twistedmatrix.com/trac/ticket/7922> and the buildbots are green on the branch (the intermittent thread failure failed intermittently).
> 
> Especially if you defined your own IService implementations that do not inherit from Service, please run your unittests with this branch.

I'm in favor of this change, as it allows for hierarchy-traversal between IService and IServiceCollection that was not previously technically possible with the formal interface.  As Moshe says, the docstrings already imply the existence of this attribute, and the existing implementation already has it.  Other non-inheriting IService implementations have it too, at least from what I have heard on IRC so far.

-glyph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20150604/8026c5b4/attachment-0002.html>


More information about the Twisted-Python mailing list