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 Ben.Darnell
Recipients Ben.Darnell, christian.heimes, giampaolo.rodola, janssen, nikratio, pitrou, r.david.murray
Date 2014-03-26.01:53:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:57Ben.Darnellsetrecipients: + Ben.Darnell, janssen, pitrou, giampaolo.rodola, christian.heimes, r.david.murray, nikratio
2014-03-26 01:53:57Ben.Darnellsetmessageid: <>
2014-03-26 01:53:57Ben.Darnelllinkissue20951 messages
2014-03-26 01:53:56Ben.Darnellcreate