Commit graph

197 commits

Author SHA1 Message Date
Joost Lekkerkerker
2fa7113787
Raise issue if SSL is set but no external URL configured (#121768)
* Raise issue if SSL is set but no external URL configured

* Add cloud

* Add cloud

* Fix strings

* Attempt

* Fix

* Fix

* Move strings

* Fixes

* fix

* Fix

* Fix

* Fix

* Break tests

* Fix tests
2024-09-24 15:35:10 +02:00
J. Nick Koston
6bdc5be433
Bump aiohttp to 3.10.0b1 (#122409) 2024-07-23 12:10:22 -05:00
Max
702d53ca30
Correct deprecation warning async_register_static_paths (#120592) 2024-06-26 20:55:25 +02:00
J. Nick Koston
6a3778c48e
Deprecate register_static_path in favor of async_register_static_paths (#119895)
* Deprecate register_static_path in favor of async_register_static_path

`hass.http.register_static_path` is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_path([StaticPathConfig(url_path, path, cache_headers)])`

The arguments to `async_register_static_path` are the same as `register_static_path` except they are wrapped in the `StaticPathConfig` dataclass and an iterable of them is accepted to allow registering multiple paths at once to avoid multiple executor jobs.

* add date

* spacing
2024-06-18 21:51:24 -04:00
J. Nick Koston
419dcbf9a1
Fix typo in KEY_ALLOW_CONFIGRED_CORS (#119905) 2024-06-18 12:44:27 -05:00
J. Nick Koston
faa55de538
Fix blocking I/O in the event loop when registering static paths (#119629) 2024-06-18 08:18:31 +02:00
Robert Resch
cb62f4242e
Remove strict connection (#117933) 2024-05-24 15:50:22 +02:00
Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
J. Nick Koston
673bbc1372
Switch out aiohttp-isal for aiohttp-fast-zlib to make isal optional (#116814)
* Switch out aiohttp-isal for aiohttp-fast-zlib to make isal optional

aiohttp-isal does not work on core installs where the system has 32bit userland and a 64bit kernel because we have no way to detect this configuration or handle it.

fixes #116681

* Update homeassistant/components/isal/manifest.json

* Update homeassistant/components/isal/manifest.json

* hassfest

* isal

* fixes

* Apply suggestions from code review

* make sure isal is updated before http

* fix tests

* late import
2024-05-05 17:06:12 -04:00
Robert Resch
630ddd6a8c
Revert "Remove strict connection" (#116416) 2024-04-29 21:26:40 +02:00
Robert Resch
dfc198cae0
Remove strict connection (#116396) 2024-04-29 19:33:31 +02:00
Robert Resch
a4829330f6
Add strict connection for cloud (#115814)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-24 09:57:38 +02:00
J. Nick Koston
0a78e9d4aa
Replace aiohttp-zlib-ng[isal] with aiohttp-isal (#115777)
* Replace aiohttp-zlib-ng[isal] with aiohttp-isal

The extra was causing wheel builds to fail

Since isal works on all of our supported platforms we can
always use it and drop the need for zlib-ng

https://github.com/home-assistant/core/actions/runs/8725019072

https://github.com/bdraco/aiohttp-isal

* typo
2024-04-17 19:46:15 +02:00
Robert Resch
348e1df949
Add strict connection (#112387)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-12 14:47:46 +02:00
J. Nick Koston
7a2e529bb7
Avoid executor job to start http if server_host is unspecified (#114609)
* Avoid executor job to start http if server_host is unspecified

Same as #112522 for http

* adjust test

* CONF_SERVER_HOST is always set now
2024-04-04 07:51:18 +02:00
J. Nick Koston
c615b52840
Refactor integration startup time to show wall clock time (#113707)
* Refactor setup time tracking to exclude time waiting on other operations

We now exclude the import time and th time waiting on
base platforms to setup from the setup times

* tweak

* tweak

* tweak

* tweak

* adjust

* fixes

* fixes

* preen

* preen

* tweak

* tweak

* adjust

* tweak

* reduce

* do not count integrtion platforms against their parent integration

* handle legacy tts platforms

* stt as well

* one more wait

* use the same pattern in all the legacy

* fix tts and stt legacy

* fix

* fix

* reduce

* preen

* entity comp does not wait for platforms

* scene blocks as well

* fix test

* test fixes

* coverage

* coverage

* coverage

* fix test

* Update tests/test_setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/test_setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* strip

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* remove complexity

* Apply suggestions from code review

* no longer works that way

* fixes

* fixes

* fixes

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-18 21:45:34 -04:00
Marc Mueller
8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Marc Mueller
2d701d5a7d
Use aiohttp.AppKey for http cors keys (#112658) 2024-03-08 11:51:59 +01:00
Marc Mueller
531e25cbc6
Change KEY_HASS to be an aiohttp AppKey (#111954) 2024-03-07 13:37:48 +01:00
J. Nick Koston
9be4fb0574
Start fetching the source ip sooner in http to reduce setup time (#112461) 2024-03-05 21:32:02 -05:00
J. Nick Koston
c1750f7c3a
Fix circular imports in core integrations (#111875)
* Fix circular imports in core integrations

* fix circular import

* fix more circular imports

* fix more circular imports

* fix more circular imports

* fix more circular imports

* fix more circular imports

* fix more circular imports

* fix more circular imports

* adjust

* fix

* increase timeout

* remove unused logger

* keep up to date

* make sure its reprod
2024-02-29 21:04:41 -05:00
Marc Mueller
446f560b59
Set aiohttp shutdown_timeout on AppRunner instead of TCPSite (#105973) 2023-12-18 10:59:23 -10:00
J. Nick Koston
1522118453
Remove aiohttp cancel on disconnect workaround (#104175) 2023-11-29 11:20:36 -07:00
J. Nick Koston
1b048ff388
Remove HomeAssistantAccessLogger (#104173) 2023-11-29 10:40:19 -07:00
J. Nick Koston
d1f1bbe304
Migrate to using aiohttp-fast-url-dispatcher (#103656) 2023-11-09 17:23:33 +01:00
J. Nick Koston
45f5c21402
Speed up websocket and ingress with aiohttp-zlib-ng (#103247) 2023-11-02 15:18:12 -05:00
Erik Montnemery
c481fdb7d0
Rename safe mode to recovery mode (#102580) 2023-10-23 20:33:08 +02:00
Ville Skyttä
c287bd1a3b
Remove pylint configs flagged by useless-suppression (#99081) 2023-08-26 17:46:03 +03:00
Ville Skyttä
9da192c752
Avoid use of datetime.utc* methods deprecated in Python 3.12 (#93684)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-24 16:38:22 +02:00
Franck Nijhof
5e020ea354
Add is_admin checks to cloud APIs (#97804) 2023-08-08 11:02:42 +02:00
Franck Nijhof
369a484a78
Add default headers to webserver responses (#97784)
* Add default headers to webserver responses

* Set default server header

* Fix other tests
2023-08-06 23:25:13 -04:00
J. Nick Koston
882529c0a0
Simplify FastUrlDispatcher resolve (#96234) 2023-07-10 11:13:27 +02:00
J. Nick Koston
f1db497efe
Avoid http route linear search fallback when there are multiple paths (#95776) 2023-07-07 19:36:38 +02:00
J. Nick Koston
2b66480894
Speed up routing URLs (#95721)
alternative to #95717
2023-07-02 23:00:33 -04:00
J. Nick Koston
e27554f7a6
Improve http handler performance (#93324) 2023-05-21 13:36:03 -05:00
J. Nick Koston
72b09bfee7
Subclass aiohttp requests to use json helper (#90214)
* Subclass aiohttp requests to use json helper

* Subclass aiohttp requests to use json helper

* remove unneeded

* revert for new pr

* override loads is never used so drop it

* override loads is never used so drop it
2023-03-24 15:37:43 -04:00
J. Nick Koston
dd0f05b980
Avoid calling the http access logging when logging is disabled (#90152) 2023-03-23 09:55:02 -10:00
Marc Mueller
386533a16f
Update mypy to 1.1.1 (#89268)
* Update mypy to 1.1.1
* Update pydantic to 1.10.6
2023-03-08 22:57:54 +01:00
Marc Mueller
8abce25948
Update Union typing (4) [Py310] (#86427) 2023-01-23 09:04:40 +01:00
Franck Nijhof
79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Mike Degatano
87aacf9fbe
Increase max line size for ingress addons (#85775) 2023-01-13 13:30:28 +01:00
Franck Nijhof
cb13418bab
String formatting and max line length - Part 2 (#84393) 2022-12-22 11:38:59 +01:00
epenet
454bdcc00d
Expose http constants in root (#78267) 2022-09-12 18:41:18 +02:00
epenet
16900dcef1
Make Store a generic class (#74617) 2022-07-09 22:32:57 +02:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00
Franck Nijhof
3afadf8adb
Revert "Block peer certs on supervisor" (#67104) 2022-02-23 12:32:07 +01:00
Paulus Schoutsen
938b64081b
Block peer certs on supervisor (#66837)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2022-02-22 13:59:40 -08:00
J. Nick Koston
3bf2be1765
Startup with an emergency self signed cert if the ssl certificate cannot be loaded (#66707) 2022-02-18 16:08:26 -08:00
Marc Mueller
370832f527
Fix http typing (#66506) 2022-02-14 13:40:31 +01:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 (#65788) 2022-02-05 14:19:37 +01:00