]> granicus.if.org Git - python/commitdiff
Provide dummy (do-nothing) settrace() and setprofile() functions until
authorTim Peters <tim.peters@gmail.com>
Sun, 29 Jun 2003 16:50:06 +0000 (16:50 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 29 Jun 2003 16:50:06 +0000 (16:50 +0000)
Jeremy can check in the real things.

Lib/threading.py
Misc/NEWS

index 1c37963a4904996700bcb15f3889248a92ee3f01..7ec8eff92bb391170e497a6fc30f0b377f4a2305 100644 (file)
@@ -14,7 +14,8 @@ from traceback import print_exc as _print_exc
 
 # Rename some stuff so "from threading import *" is safe
 __all__ = ['activeCount', 'Condition', 'currentThread', 'enumerate', 'Event',
-           'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', 'Timer']
+           'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread',
+           'Timer', 'setprofile', 'settrace']
 
 _start_new_thread = thread.start_new_thread
 _allocate_lock = thread.allocate_lock
@@ -600,6 +601,13 @@ def enumerate():
     _active_limbo_lock.release()
     return active
 
+# XXX This needs a real defintion.
+def settrace(tracefunc):
+    pass
+
+# XXX This needs a real defintion.
+def setprofile(dispatchfunc):
+    pass
 
 # Create the main thread object
 
index 02cb788b9ae6e319a1ee01a7e64d749acf5616ba..b006c28754c9d39cdcd1576616591bb028b3458d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -127,6 +127,10 @@ Library
   that cooperate with the functions of the same name in the sys
   module.  A function registered with the threading module will
   be used for all threads it creates.
+  XXX Somebody forget to check these in to threading.py, although
+  XXX some other library modules call them.  This will be repaired
+  XXX before the final release.  For now, dummy settrace() and
+  XXX setprofile() functions have been added to threading.py.
 
 - copy.py: applied SF patch 707900, fixing bug 702858, by Steven
   Taschuk.  Copying a new-style class that had a reference to itself