Fix blocking late import of httpcore from httpx (#141771)

There is a late import that blocks the event loop
in newer version
9e8ab40369/httpx/_transports/default.py (L75)
This commit is contained in:
J. Nick Koston 2025-03-29 20:59:40 -10:00 committed by Franck Nijhof
parent 7592d350a8
commit 363bd75129
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -7,6 +7,9 @@ import sys
from types import TracebackType
from typing import Any, Self
# httpx dynamically imports httpcore, so we need to import it
# to avoid it being imported later when the event loop is running
import httpcore # noqa: F401
import httpx
from homeassistant.const import APPLICATION_NAME, EVENT_HOMEASSISTANT_CLOSE, __version__