[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning
Amaury Forgeot d'Arc
report at bugs.python.org
Thu Oct 30 02:02:19 CET 2008
New submission from Amaury Forgeot d'Arc <amauryfa at gmail.com>:
>>> import io
>>> io.FileIO('foo', 'rt')
__main__:1: RuntimeWarning: Trying to close unclosable fd!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid mode: rt
The ValueError is expected, but the warning is not.
This happens on file deallocation: the file object is in an invalid
state.
----------
messages: 75346
nosy: amaury.forgeotdarc
severity: normal
status: open
title: io.FileIO('foo', 'rt') prints a RuntimeWarning
versions: Python 2.6, Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4237>
_______________________________________
More information about the Python-bugs-list
mailing list