diff --git a/doc/tutorials/dask.rst b/doc/tutorials/dask.rst index 0a2466ec9053..9d43eb8bcf36 100644 --- a/doc/tutorials/dask.rst +++ b/doc/tutorials/dask.rst @@ -510,10 +510,10 @@ IPv6 Support .. versionadded:: 2.0.0 -XGBoost has initial IPv6 support for the dask interface. Due to most of the cluster -support for IPv6 is partial (duo stack instead of IPv6 only), we require additional user -configuration similar to :ref:`tracker-ip` to help XGBoost obtain the correct address -information: +XGBoost has initial IPv6 support for the dask interface on Linux. Due to most of the +cluster support for IPv6 is partial (duo stack instead of IPv6 only), we require +additional user configuration similar to :ref:`tracker-ip` to help XGBoost obtain the +correct address information: .. code-block:: python diff --git a/python-package/xgboost/testing.py b/python-package/xgboost/testing.py index 783862250fc0..4cb5840dd70c 100644 --- a/python-package/xgboost/testing.py +++ b/python-package/xgboost/testing.py @@ -1,6 +1,7 @@ """Utilities for defining Python tests.""" import socket +from platform import system from typing import TypedDict PytestSkip = TypedDict("PytestSkip", {"condition": bool, "reason": str}) @@ -8,6 +9,10 @@ def has_ipv6() -> bool: """Check whether IPv6 is enabled on this host.""" + # connection error in macos, still need some fixes. + if system() not in ("Linux", "Windows"): + return False + if socket.has_ipv6: try: with socket.socket(