From 73e1f8a7e53137757ea4a5eda3ee9c08ce33050f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 5 Mar 2024 12:22:59 -1000 Subject: [PATCH] Pre import image_upload to avoid loading it after asyncio has started (#112444) image_upload will always be setup because its a dep of person and since person is a dep of onboarding which is a dep of frontend its already a base requirement for homeassistant. Pillow is now listed as a requirement for homeassistant so we can be sure it installed by the time bootstrap is loaded image_upload loading is currently a bottleneck to get the frontend loaded because it has to load in the import executor when everything is busy early in startup --- homeassistant/bootstrap.py | 1 + pyproject.toml | 1 + requirements.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index a6aadcc67a6..84581131edc 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -36,6 +36,7 @@ from .components import ( file_upload as file_upload_pre_import, # noqa: F401 history as history_pre_import, # noqa: F401 http, # not named pre_import since it has requirements + image_upload as image_upload_import, # noqa: F401 - not named pre_import since it has requirements lovelace as lovelace_pre_import, # noqa: F401 onboarding as onboarding_pre_import, # noqa: F401 recorder as recorder_import, # noqa: F401 - not named pre_import since it has requirements diff --git a/pyproject.toml b/pyproject.toml index 19b8f810899..765adc656d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ dependencies = [ "PyJWT==2.8.0", # PyJWT has loose dependency. We want the latest one. "cryptography==42.0.5", + "Pillow==10.2.0", # pyOpenSSL 23.2.0 is required to work with cryptography 41+ "pyOpenSSL==24.0.0", "orjson==3.9.15", diff --git a/requirements.txt b/requirements.txt index b7a970bc967..2a9358c911f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,6 +23,7 @@ Jinja2==3.1.3 lru-dict==1.3.0 PyJWT==2.8.0 cryptography==42.0.5 +Pillow==10.2.0 pyOpenSSL==24.0.0 orjson==3.9.15 packaging>=23.1