diff --git a/studio/backend/tests/test_offline_gguf_cache_fallback.py b/studio/backend/tests/test_offline_gguf_cache_fallback.py index e49045df03..c92391f2f0 100644 --- a/studio/backend/tests/test_offline_gguf_cache_fallback.py +++ b/studio/backend/tests/test_offline_gguf_cache_fallback.py @@ -1180,12 +1180,10 @@ class TestIpv6Endpoint: def test_ipv6_literal_resolves(self): """gethostbyname is IPv4-only and would call an AAAA-only mirror dead.""" from utils.utils import dns_host_dead - assert dns_host_dead("::1", timeout = 2.0) is False def test_unresolvable_host_still_dead(self): from utils.utils import dns_host_dead - assert dns_host_dead("no-such-host.invalid", timeout = 2.0) is True diff --git a/studio/backend/utils/transformers_version.py b/studio/backend/utils/transformers_version.py index 7ca47198a0..02e29677d5 100644 --- a/studio/backend/utils/transformers_version.py +++ b/studio/backend/utils/transformers_version.py @@ -81,7 +81,6 @@ def hf_endpoint_unreachable(timeout: int = 3, *, gateway_errors_offline: bool = # hub here exactly as it does in the DNS shortcut, instead of probing "https://". try: from utils.utils import hf_endpoint_url - endpoint = hf_endpoint_url() except Exception: endpoint = (os.environ.get("HF_ENDPOINT") or "").strip() or "https://huggingface.co" @@ -133,7 +132,6 @@ def hf_endpoint_unreachable(timeout: int = 3, *, gateway_errors_offline: bool = # Bounded separately so the whole probe stays within a predictable deadline. try: from utils.utils import hf_tcp_reachable - return not hf_tcp_reachable(min(timeout, 2.0), endpoint) except Exception: return True