Index: Lib/urllib.py =================================================================== --- Lib/urllib.py (revision 69418) +++ Lib/urllib.py (working copy) @@ -980,6 +980,9 @@ def geturl(self): return self.url + @property + def fileno(self): + return self.fp.fileno # Utilities to parse URLs (most of these return None for missing parts): # unwrap('') --> 'type://host/path' Index: Lib/test/test_urllib2net.py =================================================================== --- Lib/test/test_urllib2net.py (revision 69418) +++ Lib/test/test_urllib2net.py (working copy) @@ -91,6 +91,21 @@ response.close() self.assert_(fileobject.closed) + +class Test_AddInfoURL(unittest.TestCase): + + def test_fileno(self): + request = urllib2.Request("http://pheared.net") + opener = urllib2.build_opener() + r = opener.open(request) + try: + r.fileno() + except AttributeError: + self.fail('addinfourl.fileno() should work with HTTPResponse') + finally: + r.close() + + class OtherNetworkTests(unittest.TestCase): def setUp(self): if 0: # for debugging