From: Zackery Spytz Date: Thu, 8 Aug 2019 21:48:00 +0000 (-0600) Subject: bpo-37268: test_parser fails when run with -Werror (GH-15183) X-Git-Tag: v3.9.0a1~898 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10a0a093231ea82a3bfd33fd63322aebd8406866;p=thirdparty%2FPython%2Fcpython.git bpo-37268: test_parser fails when run with -Werror (GH-15183) Use warnings.filterwarnings() when importing the deprecated parser module. @pablogsal https://bugs.python.org/issue37268 Automerge-Triggered-By: @pablogsal --- diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index ec1845d7fe9a..7295f66d393a 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -1,5 +1,9 @@ import copy -import parser +import warnings +with warnings.catch_warnings(): + warnings.filterwarnings('ignore', 'The parser module is deprecated', + DeprecationWarning) + import parser import pickle import unittest import operator