[issue5323] document expected/required behavior of 3.x io subsystem with respect to buffering

R. David Murray report at bugs.python.org
Sat Feb 21 15:46:47 CET 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

On Sat, 21 Feb 2009 at 13:14, Antoine Pitrou wrote:
> Antoine Pitrou <pitrou at free.fr> added the comment:
>
> RDM, all the classes you mentioned should indeed be able to do "short
> reads" on pipes, sockets and the like. That's how they are tested in
> test_io.py: against mock raw i/o classes which only return a few bytes
> at a time (e.g. only 5 bytes will be filled in a 4096-byte buffer).

My questions in the last comment were directed at trying to clarify
the documentation.

I think my most important point there is whether or not 'read1' should
be added to the BufferedIOBase ABI.  I believe it should be, since
if a class derived from BufferedIOBase does not implement it and is
passed to TextIOWrapper, it will fail.

> However, I encourage you once again to *experiment* with the 3.x i.o
> library and share your results with us. This is the best way for us to
> know whether common use cases are really covered.

As I said, I plan to do so.  I needed to understand the intent first,
though, and reading the docs resulted in some doc questions.  Should I
be opening each point in a separate issue and/or providing a suggested
doc patch?  I'm new to trying to help out via the tracker, so best
practice pointers are welcome.

--RDM

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


More information about the Python-bugs-list mailing list