STINNER Victor <victor.stin...@haypocalc.com> added the comment: This issue is fixed in Python 3.2 beta 2: -------- $ ./python >>> f=open("/dev/full", "wb") >>> f.write(b'x') 1 >>> f.close() IOError: [Errno 28] No space left on device >>> ^D
sys:1: ResourceWarning: unclosed file <_io.BufferedWriter name='/dev/full'> sys:1: ResourceWarning: unclosed file <_io.FileIO name='/dev/full' mode='wb'> -------- If you would like to get the error earlier, disable the buffer (which is not completly possible for a text file, Python requires at least a line buffer). Backport the fix to Python 3.1 is not a good idea because it may break programs using Python 3.1. ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10815> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com