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
This commit is contained in:
J. Nick Koston 2024-03-05 12:22:59 -10:00 committed by GitHub
parent 235771aaa2
commit 73e1f8a7e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -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",

View file

@ -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