From: Ben Darnell Date: Sun, 28 Apr 2019 23:31:52 +0000 (-0400) Subject: test: Silence a deprecation warning in py38+pycurl X-Git-Tag: v6.1.0b1~78^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=053c10668eba23171d33352ce68117a7e622e99c;p=thirdparty%2Ftornado.git test: Silence a deprecation warning in py38+pycurl --- diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py index dab76a283..44cbacd4f 100644 --- a/tornado/test/runtests.py +++ b/tornado/test/runtests.py @@ -150,6 +150,16 @@ def main(): warnings.filterwarnings( "ignore", category=ResourceWarning, module=r"asyncio\..*" ) + # This deprecation warning is introduced in Python 3.8 and is + # triggered by pycurl. Unforunately, because it is raised in the C + # layer it can't be filtered by module and we must match the + # message text instead (Tornado's C module uses PY_SSIZE_T_CLEAN + # so it's not at risk of running into this issue). + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message="PY_SSIZE_T_CLEAN will be required", + ) logging.getLogger("tornado.access").setLevel(logging.CRITICAL)