]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Silence a deprecation warning in py38+pycurl
authorBen Darnell <ben@bendarnell.com>
Sun, 28 Apr 2019 23:31:52 +0000 (19:31 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 22 Jun 2019 22:19:07 +0000 (18:19 -0400)
tornado/test/runtests.py

index dab76a2831eafd5569e4d01037a9e859209e1b80..44cbacd4fd610ce67e464add7381c7b2414a52c1 100644 (file)
@@ -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)