[docs] [issue19154] AttributeError: 'NoneType' in http/client.py when using select when file descriptor is closed.

R. David Murray report at bugs.python.org
Tue Oct 8 22:24:19 CEST 2013


R. David Murray added the comment:

OK, I've looked at the docs and code, and as far as I can see this bug does not exist in Python3.  Or at least in 3.4, which is the only place I'd feel safe about making a change to the exception type.

To summarize: in 3.4 socket logic is based on RawIOBase, as is HTTPResponse.  And RawIOBase checks to see if the file is closed and raises a ValueError if it is, when fileno is called on the 'fp' attribute of the HTTPResponse.  At least, that's what I think based on reading the code.

So, unless you can reproduce the error in 3.3 and/or 3.4, I think we should close this issue as out of date, since as Terry said there is a non-trivial danger of backward incompatibility if we were to change the exception type in 2.7.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19154>
_______________________________________


More information about the docs mailing list