[issue10819] ValueError on repr(closed_socket_file)

2019-07-29 Thread STINNER Victor
STINNER Victor added the comment: This issue is closed. Please open a new issue. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue10819] ValueError on repr(closed_socket_file)

2019-07-24 Thread Nir Soffer
Nir Soffer added the comment: I find this new behavior a usability regression. Before this change, code (e.g python 2 code ported to python 3) could do: fd = sock.fileno() Without handling errors, since closed socket would raise (good). Now such code need to check the return value (bad):

[issue10819] ValueError on repr(closed_socket_file)

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: Fixed by r87730. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-

[issue10819] ValueError on repr(closed_socket_file)

2011-01-03 Thread STINNER Victor
STINNER Victor added the comment: Antoine suggested me to patch SocketIO.name property instead of the BufferedReader.__repr__() method: socketio_name.patch implements this idea. -- Added file: http://bugs.python.org/file20248/socketio_name.patch ___

[issue10819] ValueError on repr(closed_socket_file)

2011-01-03 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file20247/issue10819.patch ___ Python tracker ___ _

[issue10819] ValueError on repr(closed_socket_file)

2011-01-03 Thread STINNER Victor
New submission from STINNER Victor : The following code raise a ValueError('I/O operation on closed file.'): --- import socket socket.socket(socket.SOCK_STREAM, socket.AF_INET) s=socket.socket(socket.SOCK_STREAM, socket.AF_INET) f=s.makefile("rb") f.close() print(repr(f)) --- io.BufferedReader._