1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

Drop Python 3.10 support, require Python 3.11+ (#9522)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-07-15 15:20:58 -10:00
committed by GitHub
parent 30c4b91697
commit f745135bdc
36 changed files with 61 additions and 72 deletions

View File

@@ -395,7 +395,7 @@ async def wait_and_connect_api_client(
# Wait for connection with timeout
try:
await asyncio.wait_for(connected_future, timeout=timeout)
except asyncio.TimeoutError:
except TimeoutError:
raise TimeoutError(f"Failed to connect to API after {timeout} seconds")
yield client
@@ -575,12 +575,12 @@ async def run_binary_and_wait_for_port(
process.send_signal(signal.SIGINT)
try:
await asyncio.wait_for(process.wait(), timeout=SIGINT_TIMEOUT)
except asyncio.TimeoutError:
except TimeoutError:
# If SIGINT didn't work, try SIGTERM
process.terminate()
try:
await asyncio.wait_for(process.wait(), timeout=SIGTERM_TIMEOUT)
except asyncio.TimeoutError:
except TimeoutError:
# Last resort: SIGKILL
process.kill()
await process.wait()