This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients mvyskocil, vstinner
Date 2011-01-03.14:41:45
SpamBayes Score 5.0848215e-14
Marked as misclassified No
Message-id <1294065708.99.0.0637541706927.issue10815@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-01-03 14:41:49vstinnersetrecipients: + vstinner, mvyskocil
2011-01-03 14:41:48vstinnersetmessageid: <1294065708.99.0.0637541706927.issue10815@psf.upfronthosting.co.za>
2011-01-03 14:41:45vstinnerlinkissue10815 messages
2011-01-03 14:41:45vstinnercreate