[New-bugs-announce] [issue17852] Built-in module _io can loose data from buffered files at exit

Armin Rigo report at bugs.python.org
Sat Apr 27 09:33:30 CEST 2013


New submission from Armin Rigo:

In Python 2, a buffered file opened for writing is flushed by the C library when the process exit.  In Python 3, the _pyio and _io modules don't do it reliably.  They rely on __del__ being called, which is not neccesarily the case.  The attached example ends with the file 'foo' empty (tested with Python 3.3 and the current trunk).  The same example in Python 2 using the built-in open() cannot end with 'foo' empty.

----------
components: IO
files: y.py
messages: 187890
nosy: arigo
priority: normal
severity: normal
status: open
title: Built-in module _io can loose data from buffered files at exit
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30030/y.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17852>
_______________________________________


More information about the New-bugs-announce mailing list