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

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 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

On Thu, Jun 4, 2015 at 11:50 AM Glyph <glyph@twistedmatrix.com> wrote:
I'm in favor of this change
...
Other non-inheriting IService implementations have it too, at least from what I have heard on IRC so far.
I haven't heard anything on IRC, but maybe you're thinking of Tristan's e-mail here: https://twistedmatrix.com/pipermail/twisted-python/2015-May/029521.html where he said they did, indeed, have a parent. Thanks, Moshe Z.

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

On Thu, Jun 4, 2015 at 11:50 AM Glyph <glyph@twistedmatrix.com> wrote:
I'm in favor of this change
...
Other non-inheriting IService implementations have it too, at least from what I have heard on IRC so far.
I haven't heard anything on IRC, but maybe you're thinking of Tristan's e-mail here: https://twistedmatrix.com/pipermail/twisted-python/2015-May/029521.html where he said they did, indeed, have a parent. Thanks, Moshe Z.
participants (2)
-
Glyph
-
Moshe Zadka