Update asyncio_blocking_operations for blocking ssl context (#2265)

This commit is contained in:
J. Nick Koston 2024-08-06 10:01:22 -05:00 committed by GitHub
parent 8ea4549648
commit 7b4e29a990
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,3 +94,17 @@ urllib does blocking I/O and should be run in the executor with the standard met
#### stat
`os.stat` does blocking disk I/O and should be run in the executor with the standard methods above.
#### load_default_certs
`SSLContext.load_default_certs` does blocking disk I/O to load the certificates from disk.
The following helpers ensure that the blocking I/O will happen in the executor:
- `aiohttp`: `homeassistant.helpers.aiohttp_client.async_get_clientsession` to create the `aiohttp.ClientSession`.
- `httpx`: `homeassistant.helpers.httpx_client.get_async_client` to create the `httpx.AsyncClient`.
- Generic SSL: `homeassistant.util.ssl`
#### load_verify_locations
See [load_default_certs](#load_default_certs)