[Python-checkins] r62067 - python/trunk/Lib/threading.py

jeffrey.yasskin python-checkins at python.org
Mon Mar 31 02:36:04 CEST 2008


Author: jeffrey.yasskin
Date: Mon Mar 31 02:35:53 2008
New Revision: 62067

Modified:
   python/trunk/Lib/threading.py
Log:
Block the sys.exc_clear -3 warning from threading.py.


Modified: python/trunk/Lib/threading.py
==============================================================================
--- python/trunk/Lib/threading.py	(original)
+++ python/trunk/Lib/threading.py	Mon Mar 31 02:35:53 2008
@@ -8,6 +8,7 @@
     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 @@
 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.


More information about the Python-checkins mailing list