Skip to content

Commit 7b9ee2d

Browse files
committed
Remove async_timeout
1 parent 3e0bafc commit 7b9ee2d

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

opensensemap_api/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import socket
55

66
import aiohttp
7-
import async_timeout
87

98
from . import exceptions
109

@@ -60,8 +59,8 @@ def __init__(self, sensor_id, session):
6059
async def get_data(self):
6160
"""Get details of OpenSenseMap station."""
6261
try:
63-
async with async_timeout.timeout(5):
64-
response = await self._session.get(self.base_url)
62+
timeout = aiohttp.ClientTimeout(total=5)
63+
response = await self._session.get(self.base_url, timeout=timeout)
6564

6665
_LOGGER.info("Response from OpenSenseMap API: %s", response.status)
6766
self.data = await response.json()

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ classifiers = [
2626
]
2727
dependencies = [
2828
"aiohttp>=3.8.5,<4",
29-
"async_timeout>=4,<5",
3029
]
3130

3231
[project.optional-dependencies]

0 commit comments

Comments
 (0)