Terry J. Reedy <tjre...@udel.edu> added the comment:
urllib2 became urllib.request in 3.x. In 2.6, 'timeout' became a parameter of both urlopen and OpenerDirector.open. In both cases the default was and is the 'global default timeout setting'. So 'timeout' has a default. Both functions take a Request object in lieu of a url. I see no indication that the Request object itself ever has a timeout attribute, at least not in .__init__. It certainly does not now. It seems that the idea was that timeouts are a property of an open action, not of the reusable Request object that wraps a url. CacheFTPHandler.setTimeout() is for FTP handlers. So it seems that this should be closed as either 'not a bug' or 'out of date'. ---------- nosy: +terry.reedy title: new urllib2.Request 'timeout' attribute needs to have a default -> urllib.requst.Request 'timeout' attribute needs to have a default versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue4079> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com