STINNER Victor 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:
New submission from Michal Vyskocil :
Write to /dev/full in python3 don't raise IOError. Python2 works as expected,
the close call causes an IOError exception with no space left on device message.
$ python
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2
Type "help", "copyright", "