mirror of
https://github.com/jdejaegh/irm-kmi-api.git
synced 2025-06-26 20:05:40 +02:00
Use built-in asyncio.timeout()
This commit is contained in:
parent
9af80b676b
commit
cb5a2c9076
3 changed files with 5 additions and 8 deletions
|
@ -12,7 +12,6 @@ from typing import Dict, List
|
||||||
from zoneinfo import ZoneInfo
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import async_timeout
|
|
||||||
|
|
||||||
from .pollen import PollenName, PollenLevel
|
from .pollen import PollenName, PollenLevel
|
||||||
from .const import MAP_WARNING_ID_TO_SLUG as SLUG_MAP
|
from .const import MAP_WARNING_ID_TO_SLUG as SLUG_MAP
|
||||||
|
@ -125,7 +124,7 @@ class IrmKmiApiClient:
|
||||||
headers['If-None-Match'] = self._cache[url]['etag']
|
headers['If-None-Match'] = self._cache[url]['etag']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with async_timeout.timeout(60):
|
async with asyncio.timeout(60):
|
||||||
response = await self._session.request(
|
response = await self._session.request(
|
||||||
method=method,
|
method=method,
|
||||||
url=url,
|
url=url,
|
||||||
|
|
|
@ -16,9 +16,8 @@ classifiers = [
|
||||||
]
|
]
|
||||||
keywords = ["weather", "weather-api", "netherlands", "weather-forecast", "pollen", "belgium", "luxembourg", "rain-radar"]
|
keywords = ["weather", "weather-api", "netherlands", "weather-forecast", "pollen", "belgium", "luxembourg", "rain-radar"]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aiohttp>=3.11.0",
|
"aiohttp>=3.11.0,<4.0.0",
|
||||||
"async-timeout>=4.0.3",
|
"svgwrite>=1.4.3,<2.0.0",
|
||||||
"svgwrite>=1.4.3",
|
|
||||||
]
|
]
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
aiohttp>=3.11.0
|
aiohttp>=3.11.0,<4.0.0
|
||||||
async-timeout>=4.0.3
|
svgwrite>=1.4.3,<2.0.0
|
||||||
svgwrite>=1.4.3
|
|
Loading…
Add table
Reference in a new issue