This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dima.Tisnek
Recipients Dima.Tisnek, gvanrossum, pfreixes, yselivanov
Date 2017-07-06.06:40:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499323228.71.0.235811206514.issue30861@psf.upfronthosting.co.za>
In-reply-to
Content
My 2c:

Pau's concern seems valid, in a sense that stream should work like TCP.
That's what most users would assume -- read out data until the end, only then you can see what the actual error was (socket closed, or timeout or hard error)

However, I suspect the devil may be in details -- the patch appears to assume that exception is only set by the underlying source of data (in which case user wants to read out everything up to the exception).

I can imagine a couple of use-case where an exception is set "out of band":
* to terminate bad reader (e.g. against Slowris attack)
* there's a matching StreamWriter (e.g. shared socket)

P.S.
If I'm wrong here, then bug report and patch must be clearer :)
History
Date User Action Args
2017-07-06 06:40:28Dima.Tisneksetrecipients: + Dima.Tisnek, gvanrossum, yselivanov, pfreixes
2017-07-06 06:40:28Dima.Tisneksetmessageid: <1499323228.71.0.235811206514.issue30861@psf.upfronthosting.co.za>
2017-07-06 06:40:28Dima.Tisneklinkissue30861 messages
2017-07-06 06:40:28Dima.Tisnekcreate