From: Ben Darnell Date: Mon, 2 Nov 2020 02:27:27 +0000 (-0500) Subject: platform: Deprecate twisted and cares resolvers X-Git-Tag: v6.2.0b1~62^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57cf319a71e95d9d3c521ee55c2d25d04a931f10;p=thirdparty%2Ftornado.git platform: Deprecate twisted and cares resolvers These were most interesting when the default resolver blocked the main thread. Now that the default is to use a thread pool, there is little if any demand for alternative resolvers just to avoid threads. --- diff --git a/docs/caresresolver.rst b/docs/caresresolver.rst index b5d6ddd10..4e0058eac 100644 --- a/docs/caresresolver.rst +++ b/docs/caresresolver.rst @@ -18,3 +18,7 @@ wrapper ``pycares``). so it is only recommended for use in ``AF_INET`` (i.e. IPv4). This is the default for ``tornado.simple_httpclient``, but other libraries may default to ``AF_UNSPEC``. + + .. deprecated:: 6.2 + This class is deprecated and will be removed in Tornado 7.0. Use the default + thread-based resolver instead. diff --git a/docs/twisted.rst b/docs/twisted.rst index f834eb55b..5d8fe8fbc 100644 --- a/docs/twisted.rst +++ b/docs/twisted.rst @@ -53,3 +53,8 @@ Twisted DNS resolver .. versionchanged:: 5.0 The ``io_loop`` argument (deprecated since version 4.1) has been removed. + + .. deprecated:: 6.2 + This class is deprecated and will be removed in Tornado 7.0. Use the default + thread-based resolver instead. + diff --git a/tornado/platform/caresresolver.py b/tornado/platform/caresresolver.py index e2c5009ac..962f84f48 100644 --- a/tornado/platform/caresresolver.py +++ b/tornado/platform/caresresolver.py @@ -26,6 +26,10 @@ class CaresResolver(Resolver): .. versionchanged:: 5.0 The ``io_loop`` argument (deprecated since version 4.1) has been removed. + + .. deprecated:: 6.2 + This class is deprecated and will be removed in Tornado 7.0. Use the default + thread-based resolver instead. """ def initialize(self) -> None: diff --git a/tornado/platform/twisted.py b/tornado/platform/twisted.py index 0987a84ab..153fe436e 100644 --- a/tornado/platform/twisted.py +++ b/tornado/platform/twisted.py @@ -52,6 +52,10 @@ class TwistedResolver(Resolver): .. versionchanged:: 5.0 The ``io_loop`` argument (deprecated since version 4.1) has been removed. + + .. deprecated:: 6.2 + This class is deprecated and will be removed in Tornado 7.0. Use the default + thread-based resolver instead. """ def initialize(self) -> None: