Message214876
Giampaolo, where do you see that send() may return zero if the other side has closed? I've always gotten an error in that case (EPIPE)
I vote -1 to adding a new flag to control whether it returns zero or raises and +0 to just fixing it in Python 3.5 (I don't think returning zero is an unreasonable thing to do; it's not obvious to me from send(2) that it is guaranteed to never return zero although I believe that to be the case). It'll break Tornado, but there will be plenty of time to get a fix out before then. If there were a convenient place to put a deprecation warning I'd vote to deprecate in 3.5 and fix in 3.6, but there's no good way for the application to signal that it expects a WANT_WRITE exception.
Another option may be to have SSLSocket.send() convert the WANT_WRITE exception into a socket.error with errno EAGAIN. This wouldn't break Tornado and would make socket.send and SSLSocket.send more consistent, but it's weird to hide the true error like this. |
|
Date |
User |
Action |
Args |
2014-03-26 01:53:57 | Ben.Darnell | set | recipients:
+ Ben.Darnell, janssen, pitrou, giampaolo.rodola, christian.heimes, r.david.murray, nikratio |
2014-03-26 01:53:57 | Ben.Darnell | set | messageid: <1395798837.72.0.670467013829.issue20951@psf.upfronthosting.co.za> |
2014-03-26 01:53:57 | Ben.Darnell | link | issue20951 messages |
2014-03-26 01:53:56 | Ben.Darnell | create | |
|