Message146672
Currently in the default (pre-3.3) branch, IDLE fails if its Restart Shell command is attempted:
Exception in Tkinter callback
Traceback (most recent call last):
File "Lib/tkinter/__init__.py", line 1397, in __call__
return self.func(*args)
File "Lib/idlelib/PyShell.py", line 1180, in restart_shell
self.interp.restart_subprocess()
File "Lib/idlelib/PyShell.py", line 429, in restart_subprocess
self.rpcclt.accept()
File "Lib/idlelib/rpc.py", line 525, in accept
working_sock, address = self.listening_sock.accept()
File "Lib/socket.py", line 134, in accept
fd, addr = self._accept()
OSError: [Errno 9] Bad file descriptor
IDLE Subprocess: socket error: Connection refused, retrying....
IDLE Subprocess: socket error: Connection refused, retrying....
Warning (from warnings module):
File "Lib/idlelib/run.py", line 127
socket_error = err
ResourceWarning: unclosed <socket.socket object, fd=3, family=2, type=1, proto=0>
IDLE Subprocess: socket error: Connection refused, retrying....
The culprit is recent changeset 3a5a0943b201 which attempted to prevent some debug ResourceWarnings during IDLE shutdown. Adding the close override to the RPCClient class causes the listening socket to be closed when the shell is restarted but then a new listening socket is not opened. The listening socket should only be closed when IDLE terminates, not when the subprocess is restarted. |
|
Date |
User |
Action |
Args |
2011-10-31 02:06:39 | ned.deily | set | recipients:
+ ned.deily, amaury.forgeotdarc |
2011-10-31 02:06:39 | ned.deily | set | messageid: <1320026799.26.0.540984948832.issue13300@psf.upfronthosting.co.za> |
2011-10-31 02:06:38 | ned.deily | link | issue13300 messages |
2011-10-31 02:06:38 | ned.deily | create | |
|