Martin Panter added the comment:

Looking at this again, I think a less intrusive way forward would be to:

* Document that in 3.6, the required signature is now 
BufferedIOBase.read1(size). An implementation no longer has to provide a 
default size, and no longer has to accept negative sizes.

* Explicitly document the behaviour of each concrete implementation like 
GzipFile.read1(-1) etc, if this behaviour is intentional

* Fix the BufferedReader error so that “read length must not be negative”

Relaxing the read1() signature would allow wider or easier use of 
BufferedReader, e.g. to implement HTTPResponse as I suggested in Issue 26499. 
The advantage would be using existing code that is well tested, used, 
optimized, etc, rather than a custom BufferedIOBase implementation which for 
the HTTP case is buggy.

----------
versions: +Python 3.6 -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23214>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to