From: Guido van Rossum Date: Wed, 17 Jan 2001 03:12:01 +0000 (+0000) Subject: Use __name__ instead of "test_regex" as the module name in the X-Git-Tag: v2.1a1~221 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e69d3d75874004db90718d535b9f97d27844f7c5;p=python Use __name__ instead of "test_regex" as the module name in the warnings.filterwarnings() call. This suppresses the warning when the module is imported with its full name (test.test_regex) too. --- diff --git a/Lib/test/test_regex.py b/Lib/test/test_regex.py index b925a66938..a32482152c 100644 --- a/Lib/test/test_regex.py +++ b/Lib/test/test_regex.py @@ -1,7 +1,7 @@ from test_support import verbose import warnings warnings.filterwarnings("ignore", "the regex module is deprecated", - DeprecationWarning, "test_regex") + DeprecationWarning, __name__) import regex from regex_syntax import *