From bd56722a274287b4ce6212569aff546b572923ab Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 2 Mar 2010 22:58:01 +0000 Subject: [PATCH] remove code to avoid BaseException.message bug --- Lib/argparse.py | 9 --------- Lib/test/test_argparse.py | 6 ------ 2 files changed, 15 deletions(-) diff --git a/Lib/argparse.py b/Lib/argparse.py index cde1fe95b91..34ddb61b7dc 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -120,15 +120,6 @@ except NameError: def _callable(obj): return hasattr(obj, '__call__') or hasattr(obj, '__bases__') -# silence Python 2.6 buggy warnings about Exception.message -if _sys.version_info[:2] == (2, 6): - import warnings - warnings.filterwarnings( - action='ignore', - message='BaseException.message has been deprecated as of Python 2.6', - category=DeprecationWarning, - module='argparse') - SUPPRESS = '==SUPPRESS==' diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index f589061912f..e1bc83af567 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -4183,12 +4183,6 @@ class TestImportStar(TestCase): def test_main(): with warnings.catch_warnings(): - # silence Python 2.6 buggy warnings about Exception.message - warnings.filterwarnings( - action='ignore', - message='BaseException.message has been deprecated as of' - 'Python 2.6', - category=DeprecationWarning) # silence warnings about version argument - these are expected warnings.filterwarnings( action='ignore',