Kaydet (Commit) bd56722a authored tarafından Benjamin Peterson's avatar Benjamin Peterson

remove code to avoid BaseException.message bug

üst 3f75cc5c
...@@ -120,15 +120,6 @@ except NameError: ...@@ -120,15 +120,6 @@ except NameError:
def _callable(obj): def _callable(obj):
return hasattr(obj, '__call__') or hasattr(obj, '__bases__') 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==' SUPPRESS = '==SUPPRESS=='
......
...@@ -4183,12 +4183,6 @@ class TestImportStar(TestCase): ...@@ -4183,12 +4183,6 @@ class TestImportStar(TestCase):
def test_main(): def test_main():
with warnings.catch_warnings(): 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 # silence warnings about version argument - these are expected
warnings.filterwarnings( warnings.filterwarnings(
action='ignore', action='ignore',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment