[issue19566] ERROR: test_close (test.test_asyncio.test_unix_events.FastChildWatcherTests)
Guido van Rossum
report at bugs.python.org
Wed Nov 13 17:47:00 CET 2013
Guido van Rossum added the comment:
Hmm... That fix works, and if you're concerned about the buildbots, by all means check it in.
But I think the root cause is a poor API for initializing ChildWatchers. This is currently done at the end of __init__() -- it calls self.set_loop() which is implemented by the subclass.
I think the right fix is to change the protocol to separate out the constructor from the set_loop() call (which also isn't a great name, since it does so much more -- maybe it can be called link_loop()?). This is more cumbersome (esp. for the tests), but it really rubs me the wrong way that you have to to initialize the subclass before initializing the base class.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19566>
_______________________________________
More information about the Python-bugs-list
mailing list