In <email@example.com>, Mike Meyer <firstname.lastname@example.org> typed:
> In 2.5.1 (and 2., but not 2.3): Sigh. Sorry 'bout that. Since I started it, the breakage is:
Python 2.5.1 (r251:54863, May 15 2007, 15:31:37) Traceback (most recent call last):
[GCC 3.4.6 [FreeBSD] 20060305] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
File "<stdin>", line 1, in <module>
File "/usr/opt/lib/python2.5/socket.py", line 252, in fileno
AttributeError: HTTPResponse instance has no attribute 'fileno'
The problem is that urlib2 was changed to wrap an HTTPResponse object
in a socket._fileobject to get a few more file methods. Except (as
reported above) HTTPResponse doesn't have a fileno() method, so when
_fileobject tries to use it, it blows up.
Adding an appropriate method to HTTPResponse:
fixes the problem, but may not be the best solution. If no one
suggests a better one, I'll file the appropriate bug report.
Mike Meyer <email@example.com> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.