Commit Graph

57 Commits (be81fd86d3c8094ca2f5f4dd7434032c9037ef66)

Author SHA1 Message Date
Robert Resch 380974eed4
Remove hassio from ALLOWED_USED_COMPONENTS and move some functions to helper (#127228)
* Remove hassio from ALLOWED_USED_COMPONENTS

* Move HassioServiceInfo to helpers.service_info

* Deprecate moved functions

* Add note about deprecation

* Fix tests

* Implement suggestion

* Typo

* Update pyproject.toml

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-30 12:43:41 +01:00
Erik Montnemery 9b2118e556
Remove recorder from websocket_api after dependencies (#122422)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-07-22 16:50:05 -05:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
J. Nick Koston 6ba8b7a5d6
Remove isal from after_dependencies in http (#119000) 2024-06-07 09:21:53 +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
J. Nick Koston a6a47c0b44
Make aiohttp_cors a top level import (#115563)
* Make aiohttp_cors a top level import

This was moved to a late import in #27935 but there is no
longer any need to import it late in the event loop as aiohttp_cors
is listed in pyproject.toml so it will always be available

* drop requirements as they are all top level now

* drop requirements as they are all top level now

* adjust
2024-04-15 21:06:59 +02:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller a6b842f818
Add empty line after module docstring (2) [other] (#112738) 2024-03-08 19:16:38 +01:00
J. Nick Koston 546fc1e282
Refactor file_upload to avoid janus dep (#112032) 2024-03-02 10:58:08 -10:00
J. Nick Koston 587854fd59
Remove zeroconf from ssdp after deps (#111326)
* Remove zeroconf from ssdp after deps

This was added in #36277 but is no longer needed since
we setup discovery integrations ahead of time to ensure
their deps are updated before other integrations can load
them

* adjust test
2024-02-26 23:57:41 -05:00
J. Nick Koston 53944235d2
Improve performance of async_get_integration_with_requirements (#110770)
* Improve performance of async_get_integration_with_requirements

- Migrate to the future pattern instead of using asyncio.Event
- Use sets in a few places to avoid linear searching
- Check the cache when processing deps so we do not
  create tasks to process requirements for deps that
  have already been processed

* name

* add concurrency test

* Update homeassistant/requirements.py

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

* Update homeassistant/requirements.py

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

* Update homeassistant/requirements.py

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

* Update homeassistant/requirements.py

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

* reset_mock

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-17 19:26:41 +01:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Franck Nijhof 664e490cfa
Update base image to 2023.10.0 (#102126) 2023-10-18 19:11:41 +02:00
epenet a51cc75f03
Add type hints to core tests (part 2) (#88492) 2023-02-21 09:27:13 +01:00
epenet c98b4e3204
Add typing to tests with single hass argument (2) (#87675)
* Add typing to tests with single hass argument (2)

* a few more
2023-02-08 08:51:43 +01:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Franck Nijhof bfbf9b9751
Adjusts imports in tests to match our relative import rules (#86788) 2023-01-27 12:51:58 +01:00
puddly 8c8994352d
Allow only specific packages to be skipped during startup dependency installation (#82758) 2022-11-30 08:38:52 +01:00
Marvin Wichmann 1908feab79
Increase file upload limit to 100 MB (#77117)
* Increase file upload limit to 100 MB

* Remove comment

* Add test and fix chunk processing

* Add test for wrong field

* Add review suggestions

* Use nonlocal and remove unneeded executor task

* Use Janus to process chunk uploading

* Address review comments

* Address review comments #2

* Improve tests

* Fix discovery test

* Fix tests
2022-11-29 20:46:34 -05:00
Erik Montnemery b94e1e9ef8
Fire events when long term statistics is updated (#82492)
* Fire events when long term statistics is updated

* Allow the new events to be subscribed to by anyone

* Address review comments

* Finish renaming events

* Finish renaming events

* Fix do_adhoc_statistics

* Adjust tests

* Adjust tests
2022-11-24 22:01:36 +01:00
J. Nick Koston 0ffeb6c304
Check if requirements are installed in the executor (#71611) 2022-06-13 13:10:05 -07:00
J. Nick Koston 0fce9f39b3
Avoid checking if a package is installed if it already failed (#56698) 2021-09-26 22:32:25 -07:00
J. Nick Koston f268227d64
Implement retry and backoff strategy for requirements install (#56580)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-26 14:47:03 -05:00
J. Nick Koston 6d493a848c
Ensure PyPI packages can still be installed on high latency connections (#53365) 2021-07-24 14:07:10 +02:00
J. Nick Koston fb50cf9840
Add network and callback support to SSDP (#51019)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-28 21:18:59 -05:00
J. Nick Koston 64661ee2b7
Add network configuration integration (#50874)
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 09:06:30 -07:00
J. Nick Koston d4329e01ef
Fix deadlock in async_get_integration_with_requirements after failed dep pip install (#49540) 2021-04-22 22:32:38 +02:00
Alan Tse 125161df6b
Only raise integrationnotfound for dependencies (#48241)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-01 11:30:52 -07:00
Franck Nijhof ad13a9295e
Merge multiple context managers in tests (#48146) 2021-03-27 09:17:15 +01:00
J. Nick Koston da677f7d5a
Add support for discovery via DHCP (#45087)
* Add support for discovery via DHCP

* additional tesla ouis

* merge tests

* dhcp test

* merge requirements test

* dhcp test

* dhcp discovery

* dhcp discovery

* pylint

* pylint

* pylint

* fix

* Add matching tests

* 100% cover

* cleanup

* fix codespell

* Update exception handling

* remove unneeded comment

* fix options handling exception

* fix options handling exception
2021-01-14 09:09:08 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Erik Montnemery 343e5d64b8
Add MQTT integration discovery (#41332)
* Add MQTT integration discovery

* Add script/hassfest/mqtt.py

* Unsubscribe if config entry exists

* Add homeassistant/generated/mqtt.py

* Fix bad loop

* Improve tests

* Improve tests

* Apply suggestions from code review

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>

* Prevent initiating multiple config flows

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2020-10-07 18:30:51 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Pascal Vizeli c291d4aa7d
Intelligent timeout handler for setup/bootstrap (#38329)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-05 14:58:19 +02:00
J. Nick Koston 5e65d8d3c3
Upgrade zeroconf to 0.27.1 (#36277) 2020-06-05 14:33:26 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Bas Nijholt 004af97699 Sort imports for requirements.py and its test using isort (#29836)
Unblocks https://github.com/home-assistant/home-assistant/pull/29739
2019-12-11 12:12:06 +01:00
Paulus Schoutsen 27244e29c4 Install discovery requirements if used (#29795)
* Install discovery requirements if used

* Update loader.py

* Fix types
2019-12-10 09:24:49 +01:00
Bas Nijholt f60125b5c9 Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
Paulus Schoutsen 67eeb8f258 Fix flaky test 2019-11-02 21:21:13 -07:00
Paulus Schoutsen 50affdf953
Also install after_deps (#28453) 2019-11-01 17:21:50 -07:00
Paulus Schoutsen 631a819bd1
Fix check config (#28393) 2019-10-31 11:39:26 -07:00
Paulus Schoutsen 23686710b1 Fix tests running in hass.io image (#27169)
* Fix tests running in hass.io image

* Real fix now

* Only remove wheel links
2019-10-04 22:49:51 +02:00
Joakim Plate d1b9ebc7b2 Integration requirement check refactor (#25626)
* Factor out code getting requirements for integration

* Have process requirements raise an exception

* One more lint fix

* Blackify

* Catch new exception

* Let RequirementsNotFound be a HomeAssistantError

* Correct another test

* Split catching of exceptions and avoid complete log
2019-08-07 15:35:50 -07:00
Joakim Plate 84abb57ebc Fix test_install_existing_package (#25627)
homeassistant.util.package.install_package is not
a corutine.
2019-08-01 09:37:37 -05:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Pascal Vizeli bf52aa8ccc Create progress file for pip installs (#24297)
* Create progress file for pip installs

* fix dedlock

* unflacky test

* Address comments

* Lint

* Types
2019-06-04 11:04:20 -07:00
Paulus Schoutsen 276ab191b5 Do not use the cache dir for PIP installs (#24233) 2019-06-01 10:04:12 +02:00
Pascal Vizeli d9852bc75d Support Hass.io wheels / docker env (#24175)
* Support Hass.io wheels / docker env

* address comments

* fix lint
2019-05-29 15:30:09 -07:00
Paulus Schoutsen 179fb0f3b5
Use importlib metadata to check installed packages (#24114)
* Use importlib metadata

* Fix script

* Remove unused import

* Update requirements"
2019-05-26 11:58:42 -07:00