[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3c79e0ba477 by Martin Panter in branch '3.5': Issue #22854: Fix logic for skipping test https://hg.python.org/cpython/rev/b3c79e0ba477 New changeset de8412dc477e by Martin Panter in branch 'default': Issue #22854: Merge test fix from 3.5 https://hg

[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Martin Panter
Martin Panter added the comment: I gave up on porting the fix to 2.7. Python 3 raises UnsupportedOperation (which inherits ValueError) in many cases due to Issue 9293, but Python 2 raises IOError (which does not inherit ValueError). Changing how BufferedWriter.read() etc work in Python 2 would

[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 66765a49465f by Martin Panter in branch '3.5': Issue #22854: Skip pipe seek tests on Windows https://hg.python.org/cpython/rev/66765a49465f New changeset 3b7811b58a1f by Martin Panter in branch 'default': Issue #22854: Merge Windows pipe skipping fr

[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset fb10d1f5016e by Martin Panter in branch 'default': Issue #22854: Skip pipe seekable() tests on Windows https://hg.python.org/cpython/rev/fb10d1f5016e -- ___ Python tracker

[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3d9d9ca75a31 by Martin Panter in branch '2.7': Issue #22854: fileno() is always required in IOBase; remove test https://hg.python.org/cpython/rev/3d9d9ca75a31 -- ___ Python tracker

[issue22854] Documentation/implementation out of sync for IO

2016-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc9e5f09ac0c by Martin Panter in branch '3.5': Issue #22854: Clarify documentation about UnsupportedOperation and add tests https://hg.python.org/cpython/rev/dc9e5f09ac0c New changeset c27e9dcad1a3 by Martin Panter in branch 'default': Issue #22854:

[issue22854] Documentation/implementation out of sync for IO

2016-03-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker ___ _

[issue22854] Documentation/implementation out of sync for IO

2016-03-26 Thread Martin Panter
Martin Panter added the comment: Okay let’s document fileno(), read, write and seek operations in the base classes as raising OSError then. This effectively rejects the OP (Stanislaw’s) view that the exception should be more specific. In patch v3, I changed everything over to say OSError is ra

[issue22854] Documentation/implementation out of sync for IO

2016-03-19 Thread Martin Panter
Martin Panter added the comment: Thanks for looking at this Serhiy. Here is patch v2, merged with 3.6 branch; some doc string changes were redundant with upstream Arg Clinic changes. However looking at this again, I think we should be cautious changing the documented exceptions for the base cl

[issue22854] Documentation/implementation out of sync for IO

2016-03-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have doubts about changing OSError to UnsupportedOperation in the documentation of readable() and writable(). Some implementations can try to do an IO operation without checking readable() and writable() flags. I have lesser doubt about using half-closed p

[issue22854] Documentation/implementation out of sync for IO

2016-03-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nice patch. But it isn't applied cleanly on current tip (perhaps due to Argument Clinic). Added comments and questions on Rietveld. -- nosy: +benjamin.peterson, pitrou, serhiy.storchaka, stutzbach versions: +Python 3.5, Python 3.6 -Python 3.2, Python

[issue22854] Documentation/implementation out of sync for IO

2016-03-13 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22854] Documentation/implementation out of sync for IO

2014-12-20 Thread Martin Panter
Martin Panter added the comment: Some of the docstrings already mention UnsupportedOperation. This patch updates the rest of the documentation. Also adds some tests to verify this on all the concrete classes I could think of. Some discoveries in the process: * BufferedWriter.readable() and Buf

[issue22854] Documentation/implementation out of sync for IO

2014-11-12 Thread Martin Panter
Martin Panter added the comment: Similarly for the readable(), seekable() and writable() documentation -- nosy: +vadmium ___ Python tracker ___ __

[issue22854] Documentation/implementation out of sync for IO

2014-11-12 Thread Stanislaw Pitucha
Stanislaw Pitucha added the comment: Just in case: yes, UnsupportedOperation is an IOError - but shouldn't docstring here be more specific? -- ___ Python tracker ___ ___

[issue22854] Documentation/implementation out of sync for IO

2014-11-12 Thread Stanislaw Pitucha
New submission from Stanislaw Pitucha: The docstring on for fileno() method says: "An IOError is raised if the IO object does not use a file descriptor." In reality, UnsupportedOperation is raised instead: ``` : io.StringIO().fileno() UnsupportedOperation: fileno ``` -- components: IO