summaryrefslogtreecommitdiffstats
path: root/Lib/test/support/__init__.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2017-09-09 07:30:15 (GMT)
committerGitHub <noreply@github.com>2017-09-09 07:30:15 (GMT)
commitefb1d0a3c001a6153211063ba439b9847aa03509 (patch)
treefdfc7187242eb8db236c5b2445b73c61e88b429f /Lib/test/support/__init__.py
parent829dacce4fca60fc3c3367980e75e21dfcdbe6be (diff)
downloadcpython-efb1d0a3c001a6153211063ba439b9847aa03509.zip
cpython-efb1d0a3c001a6153211063ba439b9847aa03509.tar.gz
cpython-efb1d0a3c001a6153211063ba439b9847aa03509.tar.bz2
bpo-29639: change test.support.HOST to "localhost"
test.support.HOST should be "localhost" as it was in the past. See the bpo-29639. Tests that need the IP address should use HOSTv4 (added) or the existing HOSTv6 constant. This changes the definition and fixes tests that needed updating to deal with HOST being the hostname rather than the hardcoded IP address. This is only the first step in addressing https://bugs.python.org/issue29639.
Diffstat (limited to 'Lib/test/support/__init__.py')
-rw-r--r--Lib/test/support/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index bfceba1..f57b251 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -601,9 +601,8 @@ def requires_mac_ver(*min_version):
return decorator
-# Don't use "localhost", since resolving it uses the DNS under recent
-# Windows versions (see issue #18792).
-HOST = "127.0.0.1"
+HOST = "localhost"
+HOSTv4 = "127.0.0.1"
HOSTv6 = "::1"