[issue8460] Set a timeout in test_urllib2net

2010-04-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: make distclean erased the problem. :) merged to py3k in r80256 and release31-maint in r80257. Had merged to release26-maint in r80237 -- resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed __

[issue8460] Set a timeout in test_urllib2net

2010-04-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: Yes, definitely it needs to be ported. I realized that, py3k was in a bad shape at moment. File "Lib/test/test_urllib2net.py", line 151, in _test_urls import logging File "/home/senthil/python/py3k/Lib/logging/__init__.py", line 43, in import threadi

[issue8460] Set a timeout in test_urllib2net

2010-04-20 Thread STINNER Victor
STINNER Victor added the comment: Don't you port the fix to py3k? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: Committed revision 80236 in the trunk. The build-bots should not hang now. Shall merge to other branches too. -- assignee: -> orsenthil resolution: -> accepted ___ Python tracker

[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor
STINNER Victor added the comment: > The last line references, buf. It wont be available if a > socket.timeout had happened. So, it can simply be moved to > the line below buf = f.read(). Attaching the patch with > these changes. Good catch :-) > Question: Were you able to simulate a timeout

[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hello Victor, The patch looks for fine for a timeout enforcement. A couple of changes required. -if isinstance(err[0], timeout): +if isinstance(err[0], socket.timeout): And, in this portion: +try: +

[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor
STINNER Victor added the comment: Attached patch sets the timeout to 60 seconds. It writes "" % url to stderr on timeout. I don't know better place to write the error. (The test doesn't fail, it just continues to the next URL) -- keywords: +patch Added file: http://bugs.python.org/fil

[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor
New submission from STINNER Victor : If an URL doesn't answer, the whole test hung. Many buildbots turned red because an URL (maybe ftp://ftp.kernel.org/pub/linux/kernel/README) didn't answer during few minutes (it works again). We should add a timeout, eg. 5 minutes. I don't know what to do o