]> granicus.if.org Git - python/commitdiff
Fix more threading API related bugs: Thread.get_name() --> Thread.name.
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 29 Nov 2008 01:48:47 +0000 (01:48 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Sat, 29 Nov 2008 01:48:47 +0000 (01:48 +0000)
Seen when setting RPCHandler.debugging=True

Lib/idlelib/rpc.py
Lib/idlelib/run.py
Misc/NEWS

index d4af81da4670e81e0464e93f13f362670ab11008..5d5bcf7e02368e10261877167305b16780e360a6 100644 (file)
@@ -106,7 +106,7 @@ class RPCServer(socketserver.TCPServer):
             erf = sys.__stderr__
             print('\n' + '-'*40, file=erf)
             print('Unhandled server exception!', file=erf)
-            print('Thread: %s' % threading.current_thread().get_name(), file=erf)
+            print('Thread: %s' % threading.current_thread().name, file=erf)
             print('Client Address: ', client_address, file=erf)
             print('Request: ', repr(request), file=erf)
             traceback.print_exc(file=erf)
@@ -149,7 +149,7 @@ class SocketIO(object):
     def debug(self, *args):
         if not self.debugging:
             return
-        s = self.location + " " + str(threading.current_thread().get_name())
+        s = self.location + " " + str(threading.current_thread().name)
         for a in args:
             s = s + " " + str(a)
         print(s, file=sys.__stderr__)
index 20770b68d032d6450fcc421b6a84a0ef034ddab2..28b7bc0bca231ee88254ba70d820375a2445a711 100644 (file)
@@ -230,7 +230,7 @@ class MyRPCServer(rpc.RPCServer):
             erf = sys.__stderr__
             print('\n' + '-'*40, file=erf)
             print('Unhandled server exception!', file=erf)
-            print('Thread: %s' % threading.current_thread().get_name(), file=erf)
+            print('Thread: %s' % threading.current_thread().name, file=erf)
             print('Client Address: ', client_address, file=erf)
             print('Request: ', repr(request), file=erf)
             traceback.print_exc(file=erf)
index 8c80bc28563937c9f9f1a56bdc500191a9994b15..7a833a311218c90bb736d6314954cc71b7856a5e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,9 @@ Core and Builtins
 Library
 -------
 
+- IDLE would print a "Unhandled server exception!" message when internal
+  debugging is enabled.
+
 - Issue #4455: IDLE failed to display the windows list when two windows have
   the same title.