From: Ben Darnell Date: Fri, 27 Apr 2018 17:16:48 +0000 (-0400) Subject: twisted: Deprecate TornadoReactor X-Git-Tag: v5.1.0b1~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6708057fb5ae1a14ddaeed615e7095e6ed051e74;p=thirdparty%2Ftornado.git twisted: Deprecate TornadoReactor This is unnecessary when the asyncio event loop can be used instead. --- diff --git a/tornado/platform/twisted.py b/tornado/platform/twisted.py index 4ae98be97..b38a755c8 100644 --- a/tornado/platform/twisted.py +++ b/tornado/platform/twisted.py @@ -124,6 +124,13 @@ class TornadoReactor(PosixReactorBase): .. versionchanged:: 5.0 The ``io_loop`` argument (deprecated since version 4.1) has been removed. + + .. deprecated:: 5.1 + + This class will be removed in Tornado 6.0. Use + ``twisted.internet.asyncioreactor.AsyncioSelectorReactor`` + instead. + """ def __init__(self): self._io_loop = tornado.ioloop.IOLoop.current() @@ -350,6 +357,10 @@ def install(): .. versionchanged:: 5.0 The ``io_loop`` argument (deprecated since version 4.1) has been removed. + .. deprecated:: 5.1 + + This functio will be removed in Tornado 6.0. Use + ``twisted.internet.asyncioreactor.install`` instead. """ reactor = TornadoReactor() from twisted.internet.main import installReactor # type: ignore @@ -411,6 +422,11 @@ class TwistedIOLoop(tornado.ioloop.IOLoop): See also :meth:`tornado.ioloop.IOLoop.install` for general notes on installing alternative IOLoops. + + .. deprecated:: 5.1 + + The `asyncio` event loop will be the only available implementation in + Tornado 6.0. """ def initialize(self, reactor=None, **kwargs): super(TwistedIOLoop, self).initialize(**kwargs)