Roundup Robot added the comment:
New changeset 0c7cf0e598e7 by Andrew Kuchling in branch '2.7':
#15840: make docs consistent by saying operations on closed files raise
ValueError.
http://hg.python.org/cpython/rev/0c7cf0e598e7
--
nosy: +python-dev
Roundup Robot added the comment:
New changeset 7a27039e4a42 by Andrew Kuchling in branch '3.4':
#15840: make docs consistent by saying operations on closed files raise
ValueError.
http://hg.python.org/cpython/rev/7a27039e4a42
--
___
Python tracker
A.M. Kuchling added the comment:
Committed to 2.7, 3.4, and default. Thanks for your patch!
--
nosy: +akuchling
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Caelyn McAulay added the comment:
Changed documentation to state that ValueError should be raised if any
operation (excluding close()) is called on a closed stream.
This appears to be what is done in iobase.c; and some investigation of
inheriting types (rawiobase, fileio, bufferedio, etc.)
Changes by Meador Inge mead...@gmail.com:
--
nosy: +meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
___
Python-bugs-list
Andrew Svetlov added the comment:
Agree with you, Hynek. It should be fixed in 3.4 only (and change should be
well documented).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
Hynek Schlawack added the comment:
I agree that standardize behavior here would be useful. But it sounds like a
candidate for 3.4. Unifying/changing it for existing releases appears rather
hairy to me?
--
assignee: docs@python -
type: - behavior
versions: +Python 3.4
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
___
New submission from Alexander Konovalenko:
Two pieces of the documentation for io.IOBase seem to contradict each other:
At http://docs.python.org/library/io.html#io.IOBase:
Note that calling any method (even inquiries) on a closed stream is undefined.
Implementations may raise IOError in this
Antoine Pitrou added the comment:
1) IOError and ValueError are not subclasses one of another. So what
should we expect an IOBase implementation to raise?
Ideally, ValueError should be raised, but I suspect some methods raise IOError
instead.
Undefined behavior means literally anything can
Antoine Pitrou added the comment:
Actually, I would suggest we standardize the docs on raising ValueError as the
official behaviour, and fix non-compliant behaviours as bugs.
--
___
Python tracker rep...@bugs.python.org
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, hynek, stutzbach
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
Antoine Pitrou added the comment:
Related: issue15841 and issue15842.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15840
___
___
13 matches
Mail list logo