summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-03-31 00:35:53 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-03-31 00:35:53 (GMT)
commit105f3d4fdc7d7c7d9198ef4c9b2be8d5755584b4 (patch)
tree91228e78d0e4af82927d5b4af113ca4c05b545a3 /Lib/threading.py
parente34c21c2a006e4ac950a519e1e662750f3e09e79 (diff)
downloadcpython-105f3d4fdc7d7c7d9198ef4c9b2be8d5755584b4.zip
cpython-105f3d4fdc7d7c7d9198ef4c9b2be8d5755584b4.tar.gz
cpython-105f3d4fdc7d7c7d9198ef4c9b2be8d5755584b4.tar.bz2
Block the sys.exc_clear -3 warning from threading.py.
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index eebe10a..516e22d 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -8,6 +8,7 @@ except ImportError:
del _sys.modules[__name__]
raise
+import warnings
from time import time as _time, sleep as _sleep
from traceback import format_exc as _format_exc
from collections import deque
@@ -24,6 +25,12 @@ ThreadError = thread.error
del thread
+# sys.exc_clear is used to work around the fact that except blocks
+# don't fully clear the exception until 3.0.
+warnings.filterwarnings('ignore', category=DeprecationWarning,
+ module='threading', message='sys.exc_clear')
+
+
# Debug support (adapted from ihooks.py).
# All the major classes here derive from _Verbose. We force that to
# be a new-style class so that all the major classes here are new-style.