From 1fef4fa1f6bef91aa58daef259bd1d759b1e4ea9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 31 May 2024 10:08:22 -0500 Subject: [PATCH] Prevent time.sleep calls from blocking the event loop (#118561) * Prevent time.sleep calls from blocking the event loop We have been warning on these since Jan 2022. 2+ years seems more than enough time to give to fix these. see https://github.com/home-assistant/core/pull/63766 * Prevent time.sleep calls from blocking the event loop We have been warning on these since Jan 2022. 2+ years seems more than enough time to give to fix these. see https://github.com/home-assistant/core/pull/63766 --- homeassistant/block_async_io.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/block_async_io.py b/homeassistant/block_async_io.py index 1e47e30876c..5f58925c53c 100644 --- a/homeassistant/block_async_io.py +++ b/homeassistant/block_async_io.py @@ -52,10 +52,9 @@ def enable() -> None: HTTPConnection.putrequest, loop_thread_id=loop_thread_id ) - # Prevent sleeping in event loop. Non-strict since 2022.02 + # Prevent sleeping in event loop. time.sleep = protect_loop( time.sleep, - strict=False, check_allowed=_check_sleep_call_allowed, loop_thread_id=loop_thread_id, )