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 and GitHub
a91f5b7192
Prevent ping integration from blocking startup ( #38504 )
2020-08-05 12:43:35 +02:00
Jelle Raaijmakers and GitHub
ef254a1c3d
Round time values in get_age() to better approximate the actual age ( #37125 )
2020-07-09 11:19:38 -07:00
Paulus Schoutsen and GitHub
3ee3ae7633
Fix cloudhooks coming in for non existing webhooks ( #36836 )
...
* Fix cloudhooks coming in for non existing webhooks
* Fix tests"
2020-06-15 16:30:40 -07:00
Paulus Schoutsen and GitHub
fae80621fb
Guard blowing up converting 0 mired/kelvin ( #35486 )
2020-06-04 08:48:39 -07:00
J. Nick Koston and GitHub
1297a09344
Avoid locking in the logging queue handler ( #35700 )
...
* Avoid locking in the logging queue handler
We do not need a lock here as the underlying queue is already
thread safe.
* Add coverage for logging handle
2020-05-17 14:39:27 +02:00
J. Nick Koston and GitHub
73616520c0
Use built in queue log handlers to avoid formatting logs in the event loop ( #35633 )
...
* Use built in queue log handlers to avoid formatting logs in the event loop
Logging is now formatted and written in another thread to
ensure there is minimal impact on the event loop when
a log message is processed.
This change replaces the existing AsyncHandler log handler
as python 3.7+ now offers an off the shelf solution
* add a simple test
* s/async_migrate_log_handlers_to_queue/async_activate_log_queue_handler/g
2020-05-16 09:29:58 -05:00
Franck Nijhof and GitHub
2223592486
Add get_url helper, deprecate base_url ( #35224 )
2020-05-08 02:29:47 +02:00
Erik Montnemery and GitHub
f1ecac92df
Fail tests if wrapped callbacks or coroutines throw ( #35010 )
2020-05-06 14:14:57 -07:00
Paulus Schoutsen and GitHub
2af984917e
Use asynctest-mock in most places ( #35109 )
...
* Use asynctest-mock in most places
* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen and GitHub
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen and GitHub
e7f8d6bbf7
Fix more tests on Python 3.8 ( #34703 )
2020-04-25 15:52:50 -07:00
Paulus Schoutsen and GitHub
d011b46985
Patch http.client to not do I/O in the event loop ( #34194 )
2020-04-15 15:32:10 -07:00
Paulus Schoutsen and GitHub
d93c09327a
Report unserializable data in websocket ( #34072 )
...
* Report unserializable data in websocket
* Fix tests
* log types too
2020-04-13 23:46:41 -07:00
springstan and GitHub
eae21be5b9
Improve string formatting v6 ( #33698 )
2020-04-07 23:14:28 +02:00
Franck Nijhof and GitHub
60bc517d01
Collection of core tests improvements ( #33757 )
...
* Collection of core tests improvements
* Added some more
* Fix aiohttp client response release
2020-04-07 09:33:23 -07:00
J. Nick Koston and GitHub
4a32a0f1da
Expand network util to check for link local addresses ( #33499 )
2020-04-01 11:24:30 -07:00
Paulus Schoutsen and GitHub
a6b5d73f1c
Report which data causes JSON serialization error ( #31901 )
2020-02-17 10:49:42 -08:00
Ville Skyttä and GitHub
5e2ba2eb77
Enable some more bandit checks ( #30857 )
...
* Enable B108 (hardcoded tmp dir), address findings
* Enable B602 (subprocess popen with shell), address findings
* Enable B604 (start process with shell), address findings
* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
2020-01-20 18:44:55 +02:00
Paulus Schoutsen and Pascal Vizeli
e1205409f3
Handle location API being exhausted ( #30798 )
2020-01-16 17:31:12 +01:00
Ville Skyttä and GitHub
5216477353
Be consistent with Home Assistant and Hass.io spelling ( #30500 )
...
* Be consistent with Home Assistant spelling
* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Ville Skyttä and GitHub
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Ville Skyttä and Paulus Schoutsen
445fd15f76
Drop Python 3.6 support ( #29978 )
2019-12-16 07:29:19 +01:00
Bas Nijholt and Franck Nijhof
f60125b5c9
Sort imports according to PEP8 for 'tests' ( #29791 )
2019-12-09 16:52:24 +01:00
Ville Skyttä and Fabian Affolter
d88ca0f5cb
Lint exclusions ( #28655 )
...
* Remove malformed pylint disable markers
* Remove some unused imports
* Remove some unneeded lint exclusions
* Remove more unneeded lint exclusions
* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Tim Gates and cgtobi
c3f07347a1
Fix simple typo: unhasable -> unhashable ( #28605 )
2019-11-07 12:39:16 +01:00
Franck Nijhof and Pascal Vizeli
2e17ad86af
Adds guards for missing information in call stack frames ( #27217 )
2019-10-05 11:59:33 +02:00
Pascal Vizeli and GitHub
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen and GitHub
7d33b0a259
Fix broken test in Python 3.7 ( #25067 )
2019-07-10 12:17:10 -07:00
Anders Melchiorsen and Otto Winter
a439e087e1
Fix time expression parsing ( #24696 )
2019-06-22 13:39:33 +02:00
Pascal Vizeli and Paulus Schoutsen
c9453bab19
Prefere binary with wheels ( #24669 )
2019-06-21 08:47:56 -07:00
Pascal Vizeli and Paulus Schoutsen
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 and GitHub
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
Paulus Schoutsen and GitHub
9e96397e6a
Require core config detection to be triggerd manually ( #24019 )
...
* Detect core config
* Remove elevation
* Lint
* Lint
* Fix type
2019-05-22 17:24:46 -07:00
Ties de Kock and Paulus Schoutsen
4004867eda
Split up yaml loaders into multiple files ( #23774 )
...
* Start moving parts of yaml utils to own module
Move parts of yaml loader out of the single large file and start
to create the structure of the yaml loaders in Ansible [0].
[0]: https://github.com/ansible/ansible/tree/devel/lib/ansible/parsing/yaml
* Finish yaml migration, update tests and mocks
* Move code around to finish the migration
* Update the mocks so that `open` is patched in
`homeassistant.util.yaml.loader` instead of
`homeassistant.util.yaml`.
* Updated mypy ignores
* Updated external API of `homeasistant.util.yaml`, see below:
Checked what part of the api of `homeassistant.util.yaml` was actually
called from outside the tests and added an `__ALL__` that contains only
these elements.
Updated the tests so that references to internal parts of the API (e.g.
the yaml module imported into `homeassistant.util.yaml.loader`) are
referenced directly from `homeassistant.util.yaml.loader`.
In `tests/test_yaml.py` the import `yaml` refers to
`homeassistant.util.yaml` and `yaml_loader` refers to `~.loader`.
Future work that remains for the next iteration is to create a custom
SafeConstructor and refers to that instead of monkey patching `yaml` with
custom loaders.
* Update mocks in yaml dumper, check_config
2019-05-09 09:07:56 -07:00
Paulus Schoutsen and GitHub
cc13713abd
No longer rely on requests ( #23685 )
...
* No longer rely on requests
* Lint
* Missed a few parts
* Fix types
* Fix more types
* Update __main__.py
* Fix tests
* Lint
* Fix script
2019-05-08 11:15:04 -07:00
Erik Montnemery and Paulus Schoutsen
407e0c58f9
Migrate tests to pytest ( #23544 )
...
* Migrate tests to pytest
* Fixup
* Use loop fixture in test_check_config
* Lint
2019-04-30 09:20:38 -07:00
Erik Montnemery and Paulus Schoutsen
84f778d23c
Improve logging of exceptions in async_create_task ( #22689 )
...
* Improve logging of exceptions in async_create_task
* Move wrapping+logging to util.logging
* Minor refactor, fix typing
* Add test
* Remove useless @wraps, fix confusing parameter name
* Review comment
2019-04-29 09:53:22 -07:00
choss and Paulus Schoutsen
c314220167
Ignore secrets.yaml when using include_dir_named ( #22929 )
...
* ignore secrets.yaml in include_dir_named include
* updating test for include_dir_named secrets ignore
2019-04-13 21:24:06 -07:00
MatthewFlamm and Sebastian Muszynski
ed93c3b2c1
Fix pressure in dark sky and openweathermap and add pressure utility ( #21210 )
2019-03-24 18:37:31 +01:00
Quentin Stafford-Fraser and Paulus Schoutsen
88be786e82
Make !include_dir_list use alphanumeric order ( #21902 )
...
* Make YAML includes such as !include_dir_list incorporate files in alphabetical order
* Test for !include_dir_list sorting
2019-03-20 23:10:08 -07:00
Jason Hu and Fabian Affolter
ba70459e1e
Remove pytest warning message ( #21713 )
2019-03-07 16:59:15 +05:30
Paulus Schoutsen and Pascal Vizeli
a9672b0d52
Load as many components in parallel as possible ( #20806 )
...
* Load as many components in parallel as possible
* Lint
2019-02-07 22:56:40 +01:00
Pascal Vizeli and Paulus Schoutsen
29b64d56be
Fix cloud webhook body ( #20739 )
...
* Bugfix cloud webhooks text response
* address comments
* Fix lint
2019-02-04 10:58:38 -08:00
starkillerOG and Paulus Schoutsen
f353d51ab1
Add check to validate gamut ( #20518 )
...
* color.util - Add check to validate gamut
* fix indents
* fix typo
* Add check to validate gamut
* Add tests for gamut checker
* fix test
* fix pylint issues
* fix hue light gamut tests
* add check to validate gamut
* move None check
* Move None check
* Include prompt to update bridge/bulb on error
* fix wrong commit
* fix error message
* Update light.py
2019-01-28 17:52:00 -08:00
Fabian Affolter and Paulus Schoutsen
25f6302813
Switch to ipapi.co ( fixes #19846 ) ( #19886 )
...
* Switch to ipapi.co (fixes #19846 )
* Fix name
* Update name
2019-01-15 16:18:57 -08:00
starkillerOG and Paulus Schoutsen
11602c1da0
Improve Philips Hue color conversion 2 ( #20118 )
...
* Add gamut capability to color util
* Include gamut in hue_test
* Improve Philips Hue color conversion
* correct import for new location hue.light
* include file changes between PR's
* update aiohue version
* update aiohue version
* update aiohue version
* fix hue_test
Now Idea why it failed compared to the previous time
* Include gamut in hue_test
* fix hue_test
* Try to test hue gamut conversion
supply a color that is well outside the color gamut of the light, and see if the response is correctly converted to within the reach of the light.
* switch from gamut A to gamut B for the tests.
* remove white space in blanck line
* Fix gamut hue test
* Add Gamut tests for the util.color
* fix hue gamut test
* fix hue gamut test
* Improve Philips Hue color conversion
2019-01-15 11:30:50 -08:00
Mickaël Schoentgen and Paulus Schoutsen
a57aae9891
Fix 2 ResourceWarning: unclosed file in test_ruamel_yaml.py ( #19780 )
...
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr >
2019-01-07 11:53:31 -05:00
Pascal Vizeli and GitHub
2bf36bb1db
Use unicode slugify ( #19192 )
...
* Update __init__.py
* Update setup.py
* Update requirements_all.txt
* Update __init__.py
* Update __init__.py
* Update __init__.py
* Update __init__.py
* Update __init__.py
* remove `-`
* fix packages
* Update package_constraints.txt
* Update __init__.py
* Update package_constraints.txt
* Update requirements_all.txt
* Update setup.py
* Fix tests
* Fix line issue
* fix all test
* fix type
* Fix lint
2018-12-17 07:51:13 +01:00