Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre import image_upload to avoid loading it after asyncio has started #112444

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Pre import image_upload to avoid loading it after asyncio has started
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
  • Loading branch information
bdraco committed Mar 5, 2024
commit 858c17abc27bf75843c0ecc0c89a649617d21ed3
1 change: 1 addition & 0 deletions homeassistant/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
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
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading