From: Ben Darnell Date: Sun, 22 Apr 2018 00:59:55 +0000 (-0400) Subject: ioloop: Deprecate some asyncio-incompatible methods X-Git-Tag: v5.1.0b1~23^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48d54d64ab5f1efe24d0cf0a393fd919df9a9e46;p=thirdparty%2Ftornado.git ioloop: Deprecate some asyncio-incompatible methods --- diff --git a/tornado/ioloop.py b/tornado/ioloop.py index 123f2ba5d..55623f34e 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -441,7 +441,8 @@ class IOLoop(Configurable): .. deprecated:: 5.0 Not implemented on the `asyncio` event loop. Use the environment - variable ``PYTHONASYNCIODEBUG=1`` instead. + variable ``PYTHONASYNCIODEBUG=1`` instead. This method will be + removed in Tornado 6.0. """ raise NotImplementedError() @@ -455,7 +456,8 @@ class IOLoop(Configurable): .. deprecated:: 5.0 Not implemented on the `asyncio` event loop. Use the environment - variable ``PYTHONASYNCIODEBUG=1`` instead. + variable ``PYTHONASYNCIODEBUG=1`` instead. This method will be + removed in Tornado 6.0. """ self.set_blocking_signal_threshold(seconds, self.log_stack) @@ -463,6 +465,10 @@ class IOLoop(Configurable): """Signal handler to log the stack trace of the current thread. For use with `set_blocking_signal_threshold`. + + .. deprecated:: 5.1 + + This method will be removed in Tornado 6.0. """ gen_log.warning('IOLoop blocked for %f seconds in\n%s', self._blocking_signal_threshold, @@ -789,6 +795,16 @@ class IOLoop(Configurable): The exception itself is not passed explicitly, but is available in `sys.exc_info`. + + .. versionchanged:: 5.0 + + When the `asyncio` event loop is used (which is now the + default on Python 3), some callback errors will be handled by + `asyncio` instead of this method. + + .. deprecated: 5.1 + + Support for this method will be removed in Tornado 6.0. """ app_log.error("Exception in callback %r", callback, exc_info=True)