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 neologix
Recipients giampaolo.rodola, neologix, pitrou
Date 2013-08-21.10:25:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM1Amj06aC4NqQTUwVJdDuaLzu4+yb3pz_33+=Xmx1S53w@mail.gmail.com>
In-reply-to <1377075501.82.0.929500692285.issue18792@psf.upfronthosting.co.za>
Content
Changing support.HOST from 'localhost' to '127.0.0.1' means that on dual-stack
hosts (I don't think the test suite would run on IPv6-only hosts anyway), the
tests will now always use IPv4, whereas they are currently using either IPv6 or
IPv4 addresses depending on the host's name resolution settings.
For example, on a RHEL6 box:

>>> socket.getaddrinfo('localhost', 0)
[(10, 1, 6, '', ('::1', 0, 0, 0)), (10, 2, 17, '', ('::1', 0, 0, 0)),
(10, 3, 0, '', ('::1', 0, 0, 0)), (2, 1, 6, '', ('127.0.0.1', 0)), (2,
2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))]

So on this host, 'localhost' resolves to '::1'. I think it would be
better to have support.HOST set to socket.getaddrinfo('localhost', 0)[0][4][0]
(sic), so that the test will use the preferred protocol on the target host, and
also that IPv6 is also tested in tests which don't explicitely use
'::1'. But this
means that we should have an support.HOSTv4 for tests that explicitly rely on
IPv4, e.g.  test_ftplib.
History
Date User Action Args
2013-08-21 10:25:14neologixsetrecipients: + neologix, pitrou, giampaolo.rodola
2013-08-21 10:25:14neologixlinkissue18792 messages
2013-08-21 10:25:14neologixcreate