Author terry.reedy
Recipients docs@python, fviard, r.david.murray, terry.reedy
Date 2013-10-08.20:36:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381264600.51.0.72555353496.issue19154@psf.upfronthosting.co.za>
In-reply-to
Content
Florent, for future reference, marking an issue for 2.7 says to us "I  want this fixed for 2.7".

I agree that having 3 different error indicators for 3 similar functions is nasty. But this is partly due to the difference between object that *has* a fd (socket) versus a object that *wraps such an object. The problem is that changing any of them could break code that just uses one of them. 

The select doc says that a 'waitable' object must have .fileno() that return a valid fd int. It says nothing about an allowed error return. This could be interpreted as meaning that not returning an fd int makes the object (such as a closed HTTPResponse) unwaitable. Or this could be interpreted as a deficiency in the select doc or code. In the module/selectmodule.c code, the various poll methods interpret -1 as the error return for a closed fd. I do not know how it deals with socket.fileno raising ValueError (or returning None?).

In the client doc, none of several examples of using HTTPResponses use select. They just use the various methods to retrieve data. I could interpret this to mean that they are not intended to work with select. The fact that they do not, reinforces that.
History
Date User Action Args
2013-10-08 20:36:40terry.reedysetrecipients: + terry.reedy, r.david.murray, docs@python, fviard
2013-10-08 20:36:40terry.reedysetmessageid: <1381264600.51.0.72555353496.issue19154@psf.upfronthosting.co.za>
2013-10-08 20:36:40terry.reedylinkissue19154 messages
2013-10-08 20:36:40terry.reedycreate