[issue35950] io.BufferedReader.writabe is False, but io.BufferedReader.truncate does not raise OSError

2019-02-09 Thread Steve Palmer
Change by Steve Palmer : -- nosy: +martin.panter ___ Python tracker <https://bugs.python.org/issue35950> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35950] io.BufferedReader.writabe is False, but io.BufferedReader.truncate does not raise OSError

2019-02-09 Thread Steve Palmer
New submission from Steve Palmer : An io.BUfferedReader object has an (inherited) writable method that returns False. io.IOBase states in the description of the writable method that "If False, write() and truncate() will raise OSError." However, if the BufferedReader object is c

[issue35869] io.BufferReader.read() returns None

2019-01-31 Thread Steve Palmer
Steve Palmer added the comment: The description of read in io.BufferedReader.read function states "Read and return size bytes, or if size is not given or negative, until EOF or if the read call would block in non-blocking mode." This does mention the non-block mode scenario, b

[issue35869] io.BufferReader.read() returns None

2019-01-31 Thread Steve Palmer
New submission from Steve Palmer : class io.BufferedIOBase states "In addition, those methods [read(), readinto() and write()] can raise BlockingIOError if the underlying raw stream is in non-blocking mode and cannot take or give enough data; unlike their RawIOBase counter

[issue35848] readinto is not a method on io.TextIOBase

2019-01-30 Thread Steve Palmer
Steve Palmer added the comment: I don't have a "real" use case. I discovered the issue when I was developing a unittest suite for what it means to be "file-like". I've been codifying the description in the standard library and exercising my tests against the

[issue35848] readinto is not a method on io.TextIOBase

2019-01-29 Thread Steve Palmer
Steve Palmer added the comment: I agree with Karthikeyan that the method does not apply in the io.TextIOBase class context. I'm sorry that I didn't spot the note in the description of io.TextIOBase - though I think that it is easy to miss. I'd suggest that there are two ways to clear

[issue35848] readinto is not a method on io.TextIOBase

2019-01-29 Thread Steve Palmer
New submission from Steve Palmer : class io.IOBase states "Even though IOBase does not declare read(), readinto(), or write() because their signatures will vary, implementations and clients should consider those methods part of the interface. Also, implementations may raise a Value