From f966e25f53e184b398e67f05c6c4d10a69ff48b4 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 22 Oct 2004 10:29:56 +0000 Subject: Backport from trunk: SF bug 917108: warnings.py does not define _test(). Removed the entire __name__ == '__main__' block. --- Lib/warnings.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Lib/warnings.py b/Lib/warnings.py index c2bc06e..397cec7 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -249,11 +249,6 @@ def _getcategory(category): return cat # Module initialization -if __name__ == "__main__": - import __main__ - sys.modules['warnings'] = __main__ - _test() -else: - _processoptions(sys.warnoptions) - simplefilter("ignore", category=OverflowWarning, append=1) - simplefilter("ignore", category=PendingDeprecationWarning, append=1) +_processoptions(sys.warnoptions) +simplefilter("ignore", category=OverflowWarning, append=1) +simplefilter("ignore", category=PendingDeprecationWarning, append=1) -- cgit v0.12