Use asyncio.timeout [s-z] (#98452)

This commit is contained in:
Marc Mueller 2023-08-15 14:34:18 +02:00 committed by GitHub
parent 71d985e4d6
commit 8b0fdd6fd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 62 additions and 97 deletions

View file

@ -4,7 +4,6 @@ from contextlib import suppress
import logging
from urllib.parse import urlparse
import async_timeout
import upb_lib
import voluptuous as vol
@ -45,7 +44,7 @@ async def _validate_input(data):
upb.connect(_connected_callback)
with suppress(asyncio.TimeoutError):
async with async_timeout.timeout(VALIDATE_TIMEOUT):
async with asyncio.timeout(VALIDATE_TIMEOUT):
await connected_event.wait()
upb.disconnect()