mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix import issues related to onboarding views (#141919)
* Fix import issues related to onboarding views * Add ha-intents and numpy to pyproject.toml * Add more requirements to pyproject.toml * Add more requirements to pyproject.toml
This commit is contained in:
parent
3951c2ea66
commit
e23da1a90f
@ -31,7 +31,7 @@ from homeassistant.helpers import area_registry as ar
|
|||||||
from homeassistant.helpers.backup import async_get_manager as async_get_backup_manager
|
from homeassistant.helpers.backup import async_get_manager as async_get_backup_manager
|
||||||
from homeassistant.helpers.system_info import async_get_system_info
|
from homeassistant.helpers.system_info import async_get_system_info
|
||||||
from homeassistant.helpers.translation import async_get_translations
|
from homeassistant.helpers.translation import async_get_translations
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import SetupPhases, async_pause_setup, async_setup_component
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from . import OnboardingData, OnboardingStorage, OnboardingStoreData
|
from . import OnboardingData, OnboardingStorage, OnboardingStoreData
|
||||||
@ -60,7 +60,7 @@ async def async_setup(
|
|||||||
hass.http.register_view(BackupInfoView(data))
|
hass.http.register_view(BackupInfoView(data))
|
||||||
hass.http.register_view(RestoreBackupView(data))
|
hass.http.register_view(RestoreBackupView(data))
|
||||||
hass.http.register_view(UploadBackupView(data))
|
hass.http.register_view(UploadBackupView(data))
|
||||||
setup_cloud_views(hass, data)
|
await setup_cloud_views(hass, data)
|
||||||
|
|
||||||
|
|
||||||
class OnboardingView(HomeAssistantView):
|
class OnboardingView(HomeAssistantView):
|
||||||
@ -430,9 +430,19 @@ class UploadBackupView(BackupOnboardingView, backup_http.UploadBackupView):
|
|||||||
return await self._post(request)
|
return await self._post(request)
|
||||||
|
|
||||||
|
|
||||||
def setup_cloud_views(hass: HomeAssistant, data: OnboardingStoreData) -> None:
|
async def setup_cloud_views(hass: HomeAssistant, data: OnboardingStoreData) -> None:
|
||||||
"""Set up the cloud views."""
|
"""Set up the cloud views."""
|
||||||
|
|
||||||
|
with async_pause_setup(hass, SetupPhases.WAIT_IMPORT_PACKAGES):
|
||||||
|
# Import the cloud integration in an executor to avoid blocking the
|
||||||
|
# event loop.
|
||||||
|
def import_cloud() -> None:
|
||||||
|
"""Import the cloud integration."""
|
||||||
|
# pylint: disable-next=import-outside-toplevel
|
||||||
|
from homeassistant.components.cloud import http_api # noqa: F401
|
||||||
|
|
||||||
|
await hass.async_add_import_executor_job(import_cloud)
|
||||||
|
|
||||||
# The cloud integration is imported locally to avoid cloud being imported by
|
# The cloud integration is imported locally to avoid cloud being imported by
|
||||||
# bootstrap.py and to avoid circular imports.
|
# bootstrap.py and to avoid circular imports.
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ ifaddr==0.2.0
|
|||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
lru-dict==1.3.0
|
lru-dict==1.3.0
|
||||||
mutagen==1.47.0
|
mutagen==1.47.0
|
||||||
|
numpy==2.2.2
|
||||||
orjson==3.10.16
|
orjson==3.10.16
|
||||||
packaging>=23.1
|
packaging>=23.1
|
||||||
paho-mqtt==2.1.0
|
paho-mqtt==2.1.0
|
||||||
|
@ -45,16 +45,41 @@ dependencies = [
|
|||||||
"ciso8601==2.3.2",
|
"ciso8601==2.3.2",
|
||||||
"cronsim==2.6",
|
"cronsim==2.6",
|
||||||
"fnv-hash-fast==1.4.0",
|
"fnv-hash-fast==1.4.0",
|
||||||
|
# ha-ffmpeg is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->assist_pipeline->tts->ffmpeg. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"ha-ffmpeg==3.2.2",
|
||||||
# hass-nabucasa is imported by helpers which don't depend on the cloud
|
# hass-nabucasa is imported by helpers which don't depend on the cloud
|
||||||
# integration
|
# integration
|
||||||
"hass-nabucasa==0.94.0",
|
"hass-nabucasa==0.94.0",
|
||||||
|
# hassil is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->assist_pipeline->conversation->hassil. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"hassil==2.2.3",
|
||||||
# When bumping httpx, please check the version pins of
|
# When bumping httpx, please check the version pins of
|
||||||
# httpcore, anyio, and h11 in gen_requirements_all
|
# httpcore, anyio, and h11 in gen_requirements_all
|
||||||
"httpx==0.28.1",
|
"httpx==0.28.1",
|
||||||
"home-assistant-bluetooth==1.13.1",
|
"home-assistant-bluetooth==1.13.1",
|
||||||
|
# home_assistant_intents is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->assist_pipeline->conversation->home_assistant_intents. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"home-assistant-intents==2025.3.28",
|
||||||
"ifaddr==0.2.0",
|
"ifaddr==0.2.0",
|
||||||
"Jinja2==3.1.6",
|
"Jinja2==3.1.6",
|
||||||
"lru-dict==1.3.0",
|
"lru-dict==1.3.0",
|
||||||
|
# mutagen is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->assist_pipeline->tts->mutagen. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"mutagen==1.47.0",
|
||||||
|
# numpy is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->alexa->camera->stream->numpy. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"numpy==2.2.2",
|
||||||
"PyJWT==2.10.1",
|
"PyJWT==2.10.1",
|
||||||
# PyJWT has loose dependency. We want the latest one.
|
# PyJWT has loose dependency. We want the latest one.
|
||||||
"cryptography==44.0.1",
|
"cryptography==44.0.1",
|
||||||
@ -64,7 +89,22 @@ dependencies = [
|
|||||||
"orjson==3.10.16",
|
"orjson==3.10.16",
|
||||||
"packaging>=23.1",
|
"packaging>=23.1",
|
||||||
"psutil-home-assistant==0.0.1",
|
"psutil-home-assistant==0.0.1",
|
||||||
|
# pymicro_vad is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->assist_pipeline->pymicro_vad. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"pymicro-vad==1.0.1",
|
||||||
|
# pyspeex-noise is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->assist_pipeline->pyspeex_noise. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"pyspeex-noise==1.0.2",
|
||||||
"python-slugify==8.0.4",
|
"python-slugify==8.0.4",
|
||||||
|
# PyTurboJPEG is indirectly imported from onboarding via the import chain
|
||||||
|
# onboarding->cloud->camera->pyturbojpeg. Onboarding needs
|
||||||
|
# to be setup in stage 0, but we don't want to also promote cloud with all its
|
||||||
|
# dependencies to stage 0.
|
||||||
|
"PyTurboJPEG==1.7.5",
|
||||||
"PyYAML==6.0.2",
|
"PyYAML==6.0.2",
|
||||||
"requests==2.32.3",
|
"requests==2.32.3",
|
||||||
"securetar==2025.2.1",
|
"securetar==2025.2.1",
|
||||||
|
8
requirements.txt
generated
8
requirements.txt
generated
@ -22,12 +22,17 @@ certifi>=2021.5.30
|
|||||||
ciso8601==2.3.2
|
ciso8601==2.3.2
|
||||||
cronsim==2.6
|
cronsim==2.6
|
||||||
fnv-hash-fast==1.4.0
|
fnv-hash-fast==1.4.0
|
||||||
|
ha-ffmpeg==3.2.2
|
||||||
hass-nabucasa==0.94.0
|
hass-nabucasa==0.94.0
|
||||||
|
hassil==2.2.3
|
||||||
httpx==0.28.1
|
httpx==0.28.1
|
||||||
home-assistant-bluetooth==1.13.1
|
home-assistant-bluetooth==1.13.1
|
||||||
|
home-assistant-intents==2025.3.28
|
||||||
ifaddr==0.2.0
|
ifaddr==0.2.0
|
||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
lru-dict==1.3.0
|
lru-dict==1.3.0
|
||||||
|
mutagen==1.47.0
|
||||||
|
numpy==2.2.2
|
||||||
PyJWT==2.10.1
|
PyJWT==2.10.1
|
||||||
cryptography==44.0.1
|
cryptography==44.0.1
|
||||||
Pillow==11.1.0
|
Pillow==11.1.0
|
||||||
@ -36,7 +41,10 @@ pyOpenSSL==25.0.0
|
|||||||
orjson==3.10.16
|
orjson==3.10.16
|
||||||
packaging>=23.1
|
packaging>=23.1
|
||||||
psutil-home-assistant==0.0.1
|
psutil-home-assistant==0.0.1
|
||||||
|
pymicro-vad==1.0.1
|
||||||
|
pyspeex-noise==1.0.2
|
||||||
python-slugify==8.0.4
|
python-slugify==8.0.4
|
||||||
|
PyTurboJPEG==1.7.5
|
||||||
PyYAML==6.0.2
|
PyYAML==6.0.2
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
securetar==2025.2.1
|
securetar==2025.2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user