Issue #11811: Factor out detection of IPv6 support on the current host
and make it available as `test.support.IPV6_ENABLED`. Patch by
Charles-François Natali.
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index 9edb197..cfdfa2c 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -873,7 +873,7 @@
def test_main():
tests = [TestFTPClass, TestTimeouts]
- if socket.has_ipv6:
+ if support.IPV6_ENABLED:
try:
DummyFTPServer((HOST, 0), af=socket.AF_INET6)
except socket.error: