Skip to content

Commit afeac58

Browse files
committed
deps: bump aiohttp dependency
1 parent c0bfc00 commit afeac58

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ readme = "README.md"
99
license = { text = "MIT" }
1010
authors = [{ name = "null8626" }]
1111
keywords = ["weather", "forecast", "weather-api", "weather-forecast"]
12-
dependencies = ["aiohttp>=3.11.13"]
12+
dependencies = ["aiohttp>=3.11.18"]
1313
classifiers = [
1414
"Development Status :: 5 - Production/Stable",
1515
"Intended Audience :: Education",

python_weather/client.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ async def get(
111111
locale = self._CustomizableBase__locale
112112

113113
subdomain = f'{locale.value}.' if locale != Locale.ENGLISH else ''
114-
delay = 0.5
115114
attempts = 0
116115
status = None
117116

@@ -132,9 +131,8 @@ async def get(
132131
if attempts == self.__max_retries:
133132
raise RequestError(status) from None
134133

135-
await sleep(delay)
134+
await sleep(0.5 * (2**attempts))
136135
attempts += 1
137-
delay *= 2
138136

139137
async def close(self) -> None:
140138
"""Closes the :class:`.Client` object. Nothing will happen if the client uses a pre-existing :class:`~aiohttp.ClientSession` or if the session is already closed."""

0 commit comments

Comments
 (0)