I believe the check is not very ugly On Mon, Feb 22, 2016, 12:40 Victor Stinner <[email protected]> wrote:
> Hi, > > 2016-02-01 13:05 GMT+01:00 Victor Stinner <[email protected]>: > > When I ran "tox" to validate my changes on CPython stdlib asyncio, I > > noticied that aiotest is now failing. Nobody ran tox recently? > > > > I updated aiotest to support the new stop() semantics: > > http://bugs.python.org/issue25593 > > (...) > > * new aiotest release supporting the new stop behaviour (I already > > pushed a change, it's configurable: old/new beheaviour, > > config.stopping=False) > > FYI I just release aiotest 0.3 to support the new behaviour of loop.stop(). > > I uses an ugly heuristic to check if we use the old or the new behaviour: > > # http://bugs.python.org/issue25593 > # Change semantics of EventLoop.stop(). Replace _StopError > exception > # with a new stopping attribute. > self.stopping = not hasattr(self.asyncio.base_events, '_StopError') > > Victor > -- Thanks, Andrew Svetlov
