This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients csernazs, dmorr, ned.deily, orsenthil
Date 2010-12-16.10:48:17
SpamBayes Score 4.0585974e-06
Marked as misclassified No
Message-id <1292496499.59.0.023229390454.issue5625@psf.upfronthosting.co.za>
In-reply-to
Content
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('localhost') is much better than that return value's [2][0] element.

I overlooked one thing in your first message, namely gethostbyname and gethostbyname_ex()[2] returning completely different ips and turning out to be exclusive. This should not be the case. gethostbyname_ex()[2] should include the ip which was returned by gethostbyname. If it were the case, the test would not have failed as well.

And btw, both these are supposed have similar behavior (The default action is to query named(8), followed by /etc/hosts) only thing is gethostbyname_ex uses the reentrant c function call and is thread-safe.

(You may probably want to identify the problem for the difference in o/p there)

And for this bug report, I am still inclined to having 'localhost' for readability purposes or leaving it as such because the problem seems be elsewhere.
History
Date User Action Args
2010-12-16 10:48:19orsenthilsetrecipients: + orsenthil, csernazs, dmorr, ned.deily
2010-12-16 10:48:19orsenthilsetmessageid: <1292496499.59.0.023229390454.issue5625@psf.upfronthosting.co.za>
2010-12-16 10:48:17orsenthillinkissue5625 messages
2010-12-16 10:48:17orsenthilcreate