[issue5625] test_urllib2 fails - urlopen error file not on local host

2010-12-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: Well, ignore my comment on order of ip addresses. It definitely does not matter in this case for test_urllib2. However, readability does matter again as per my previous explanation, since http://localhost/ was being exercised in the test_file, gethostbyname

[issue5625] test_urllib2 fails - urlopen error file not on local host

2010-12-15 Thread Zsolt Cserna
Zsolt Cserna added the comment: The order of the IP addresses doesn't matter as urllib2 is flexible enough to handle all local IP addresses as local (that was the original bug - it handled only one IP returned by gethostbyname which returned a random IP if there were more than one). So picki

[issue5625] test_urllib2 fails - urlopen error file not on local host

2010-12-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: +localaddr = socket.gethostbyname_ex(socket.gethostname())[2][0] May not be a generic solution, because in another system the other ip could be first in the list. Because the failure was in the test_file, which was basically exercising file://'loc

[issue5625] test_urllib2 fails - urlopen error file not on local host

2010-12-15 Thread Zsolt Cserna
Zsolt Cserna added the comment: The test which failed was HandlerTests.test_file, and I'm using python 2.7.1. socket.gethostbyname('localhost') returns "127.0.0.1" which is ok, but in the unittest it's already tested (line 671). The problem is that my /etc/hosts file contains a different IP t

[issue5625] test_urllib2 fails - urlopen error file not on local host

2010-12-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: Zsolt, The change in the urllib2 was at a place where tuple of all local ips were required. In test_urllib2, which testcase failed? Also, can you make this change and see if this helps in your case. - localaddr = socket.gethostbyname(socket.gethos

[issue5625] test_urllib2 fails - urlopen error file not on local host

2010-12-15 Thread Zsolt Cserna
Zsolt Cserna added the comment: Could you please add this change to test_urllib2.py as well? It has the following line: localaddr = socket.gethostbyname(socket.gethostname()) But urllib2.py has the change related to this bug. That makes test_urllib2 failing when gethostbyname repor

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-12-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: Merged the fixes in r77059, r77060 and r77061 I fixed the thishost function to return all ips in py3k. -- status: open -> closed ___ Python tracker ___

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-12-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the patch, Ned. Fixed in the trunk revision 77058. -- resolution: -> fixed ___ Python tracker ___ _

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-10-17 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-10-16 Thread Ned Deily
Ned Deily added the comment: While you're poking around in urllib2, perhaps I can interest you in looking at these patches. -- nosy: +orsenthil versions: +Python 3.2 -Python 3.0 ___ Python tracker

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-05-15 Thread Derek Morr
Changes by Derek Morr : -- nosy: +dmorr ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-03-31 Thread Ned Deily
Changes by Ned Deily : Added file: http://bugs.python.org/file13515/patch-nad0017-py3k-30.txt ___ Python tracker ___ ___ Python-bugs-list maili

[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-03-31 Thread Ned Deily
New submission from Ned Deily : [NOTE: applies to 2.x urllib2 and similar code in merged 3.x urllib] test_urllib2 can fail because urllib2.FileHandler assumes incorrectly that the local host has only a single IP address. It is not uncommon to have host IP configurations where a host has more th