]> granicus.if.org Git - python/commitdiff
remove code to avoid BaseException.message bug
authorBenjamin Peterson <benjamin@python.org>
Tue, 2 Mar 2010 22:58:01 +0000 (22:58 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 2 Mar 2010 22:58:01 +0000 (22:58 +0000)
Lib/argparse.py
Lib/test/test_argparse.py

index cde1fe95b915aa4552863b09e8e068e044a842ee..34ddb61b7dcef0fe0fd2817d9b0e7043a74f5faf 100644 (file)
@@ -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=='
 
index f589061912f754eb6d9ebbb6f359bcfa0e1c7fa0..e1bc83af567b7e3636477d66fa4240031fbc1caf 100644 (file)
@@ -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',