Fix more threading API related bugs: Thread.get_name() --> Thread.name.
Seen when setting RPCHandler.debugging=True
This commit is contained in:
parent
47c2b607b8
commit
bed1710115
|
@ -106,7 +106,7 @@ class RPCServer(socketserver.TCPServer):
|
||||||
erf = sys.__stderr__
|
erf = sys.__stderr__
|
||||||
print('\n' + '-'*40, file=erf)
|
print('\n' + '-'*40, file=erf)
|
||||||
print('Unhandled server exception!', 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('Client Address: ', client_address, file=erf)
|
||||||
print('Request: ', repr(request), file=erf)
|
print('Request: ', repr(request), file=erf)
|
||||||
traceback.print_exc(file=erf)
|
traceback.print_exc(file=erf)
|
||||||
|
@ -149,7 +149,7 @@ class SocketIO(object):
|
||||||
def debug(self, *args):
|
def debug(self, *args):
|
||||||
if not self.debugging:
|
if not self.debugging:
|
||||||
return
|
return
|
||||||
s = self.location + " " + str(threading.current_thread().get_name())
|
s = self.location + " " + str(threading.current_thread().name)
|
||||||
for a in args:
|
for a in args:
|
||||||
s = s + " " + str(a)
|
s = s + " " + str(a)
|
||||||
print(s, file=sys.__stderr__)
|
print(s, file=sys.__stderr__)
|
||||||
|
|
|
@ -230,7 +230,7 @@ class MyRPCServer(rpc.RPCServer):
|
||||||
erf = sys.__stderr__
|
erf = sys.__stderr__
|
||||||
print('\n' + '-'*40, file=erf)
|
print('\n' + '-'*40, file=erf)
|
||||||
print('Unhandled server exception!', 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('Client Address: ', client_address, file=erf)
|
||||||
print('Request: ', repr(request), file=erf)
|
print('Request: ', repr(request), file=erf)
|
||||||
traceback.print_exc(file=erf)
|
traceback.print_exc(file=erf)
|
||||||
|
|
|
@ -24,6 +24,9 @@ Core and Builtins
|
||||||
Library
|
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
|
- Issue #4455: IDLE failed to display the windows list when two windows have
|
||||||
the same title.
|
the same title.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue