Commit Graph

396 Commits (9c86adf644506bdc80344c394d27995d760b6c69)

Author SHA1 Message Date
Chuck Foster aca48b5e45
Fix duplicate Ban file entries (#103953) 2023-11-14 17:13:14 +01:00
J. Nick Koston d1f1bbe304
Migrate to using aiohttp-fast-url-dispatcher (#103656) 2023-11-09 17:23:33 +01:00
J. Nick Koston 0d63e2f9b5
Ensure large payloads are compressed in the executor with aiohttp 3.9.0 (#103592) 2023-11-07 12:37:54 -06:00
J. Nick Koston da1780f9ec
Small cleanups to process_success_login (#103282) 2023-11-07 10:48:34 +01:00
J. Nick Koston 062b510ec0
Cache the mime type of static files (#103281) 2023-11-03 12:37:29 -05:00
J. Nick Koston 45f5c21402
Speed up websocket and ingress with aiohttp-zlib-ng (#103247) 2023-11-02 15:18:12 -05:00
J. Nick Koston 8eb7766f30
Avoid path construction for static files cache hit (#102882) 2023-10-31 14:31:58 -05:00
Erik Montnemery c481fdb7d0
Rename safe mode to recovery mode (#102580) 2023-10-23 20:33:08 +02:00
Robert Resch e4742c04f2
Fix missspelled package names (#100670) 2023-09-21 10:57:23 +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 85c2216cd7
Ensure headers middleware handles errors too (#98397) 2023-08-14 17:48:11 +02:00
Robert Resch b0f68f1ef3
Use @require_admin decorator (#98061)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-14 15:07:20 +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 bc9b763688
Improve performance of http auth logging (#96464)
Avoid the argument lookups when debug logging is not enabled
2023-07-13 09:44:27 +02: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 7995d3777a
Fix package names to match pypi index metadata (#93883)
* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* uses _

* uses -

* fix metadata
2023-05-31 21:12:53 -04:00
J. Nick Koston e27554f7a6
Improve http handler performance (#93324) 2023-05-21 13:36:03 -05:00
J. Nick Koston 3f43184187
Speed up signing paths (#93127) 2023-05-17 22:01:13 +02:00
Erik Montnemery 043812bfc3
Bump hass-nabucasa to 0.67.1 (#92484)
* Bump hass-nabucasa to 0.67.1

* Fix typing
2023-05-08 10:51:47 +02:00
Franck Nijhof b033232b06
Filter out ASCII tab or newline from input URLs (#90348) 2023-03-27 13:49:40 -04: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
Paulus Schoutsen 12352b2ce1
Always enforce URL param ordering for signed URLs (#90148)
Always enforce URL param ordering
2023-03-22 22:54:09 -04:00
J. Nick Koston ca576d45ac
Cache decode of JWT tokens (#90013) 2023-03-22 16:03:41 -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
Franck Nijhof 95ed6fbc08
Small improvements to middleware filter (#88921)
Small improvements middleware filter
2023-02-28 12:07:17 -05:00
epenet ba23816a0c
Inverse json import logic (#88099)
* Fix helpers and util

* Adjust components

* Move back errors

* Add report

* mypy

* mypy

* Assert deprecation messages

* Move test_json_loads_object

* Adjust tests

* Fix rebase

* Adjust pylint plugin

* Fix plugin

* Adjust references

* Adjust backup tests
2023-02-16 11:37:57 +01:00
Erik Montnemery 899adef590
Sort manifests 4 (#87025) 2023-02-08 20:27:05 +01:00
Franck Nijhof ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
Paulus Schoutsen 9c0856787d
Improve JSON errors from HTTP view (#87042) 2023-01-31 20:37:26 +01:00
Franck Nijhof d4955a3d87
Replace assert False by raising an error (#86686) 2023-01-26 16:51:43 +01:00
Marc Mueller 8abce25948
Update Union typing (4) [Py310] (#86427) 2023-01-23 09:04:40 +01:00
Marc Mueller 45b4b0e990
Import `ParamSpec` from typing [Py310] (#86413)
* Import ParamSpec from typing [Py310]

* Update additional imports
2023-01-23 07:28:43 +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
Joakim Plate 8bd4125390
Test corrections noticed during pytest upgrade (#82579)
* Withing trigger a call to coordinator after init

* Stop discovery task on STOP event

* Stop dsmr connection task on STOP

* Use autospec in modem_serial tests

close on AioSerial is non async, and should not be mocked as a coroutine

* Make sure responder is specced correctly

tests/components/emulated_hue/test_init.py::test_setup_works
  /Users/joakim/src/hass/home-assistant/homeassistant/components/emulated_hue/__init__.py:119: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    protocol.close()

* Don't assume Pymodbus is the only thing logging

* Use gather instead of wait

```
homeassistant/components/homeassistant/__init__.py:208: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
```

* Increase wait time for automation tests

Assuming exit within 1 seconds is unreasonable on a potentially loaded
test machine.

* Avoid changing app state after startup
2022-11-23 20:53:28 +01:00
Franck Nijhof 2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00
epenet 454bdcc00d
Expose http constants in root (#78267) 2022-09-12 18:41:18 +02:00
Franck Nijhof 91180923ae
Fix HTTP 404 being logged as a stack trace (#75861) 2022-07-28 16:43:32 +02:00
Marc Mueller af7df260a0
Fix small type issues [core] (#75760) 2022-07-26 16:28:22 +02:00
Marc Mueller b1ed1543c8
Improve http decorator typing (#75541) 2022-07-21 13:07:42 +02:00
Franck Nijhof 9a4a7e2f4d
Extend failed login message with the request URL (#75218) 2022-07-14 21:43:14 +02:00
epenet 16900dcef1
Make Store a generic class (#74617) 2022-07-09 22:32:57 +02:00
J. Nick Koston 0c29b68cf8
Switch linear search to a dict lookup for ip bans (#74482) 2022-07-07 10:57:44 +02:00
J. Nick Koston 332cf3cd2d
Resolve and caches paths for CachingStaticResource in the executor (#74474) 2022-07-06 13:49:48 -05:00