[Python-checkins] r78600 - in python/trunk/Lib: argparse.py test/test_argparse.py

benjamin.peterson python-checkins at python.org
Tue Mar 2 23:58:01 CET 2010


Author: benjamin.peterson
Date: Tue Mar 2 23:58:01 2010
New Revision: 78600
Log:
remove code to avoid BaseException.message bug
Modified:
 python/trunk/Lib/argparse.py
 python/trunk/Lib/test/test_argparse.py
Modified: python/trunk/Lib/argparse.py
==============================================================================
--- python/trunk/Lib/argparse.py	(original)
+++ python/trunk/Lib/argparse.py	Tue Mar 2 23:58:01 2010
@@ -120,15 +120,6 @@
 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=='
 
Modified: python/trunk/Lib/test/test_argparse.py
==============================================================================
--- python/trunk/Lib/test/test_argparse.py	(original)
+++ python/trunk/Lib/test/test_argparse.py	Tue Mar 2 23:58:01 2010
@@ -4183,12 +4183,6 @@
 
 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',


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /