mirror of
https://github.com/home-assistant/core.git
synced 2026-05-04 03:51:12 +02:00
Fix blocking late import of httpcore from httpx (#141771)
There is a late import that blocks the event loop in newer version https://github.com/encode/httpx/blob/9e8ab40369bd3ec2cc8bff37ab79bf5769c8b00f/httpx/_transports/default.py#L75
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user