From 3eaa68c559aa2042719e38aaab6abcb5c5562bad Mon Sep 17 00:00:00 2001 From: Miwory Date: Sun, 23 Nov 2025 17:07:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=80=D0=B5=D0=B9?= =?UTF-8?q?=D1=82=20=D0=BB=D0=B8=D0=BC=D0=B8=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/aiohttpx/transports/rate_limiter.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 992b446..a1903f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aiohttpx" -version = "1.2.0" +version = "1.2.1" description = "Custom HTTPX client with aiohttp transport, rate limiter and caching" readme = "README.md" authors = [ diff --git a/src/aiohttpx/transports/rate_limiter.py b/src/aiohttpx/transports/rate_limiter.py index aef15da..2fbe105 100644 --- a/src/aiohttpx/transports/rate_limiter.py +++ b/src/aiohttpx/transports/rate_limiter.py @@ -27,7 +27,8 @@ class AsyncRateLimit(AiohttpTransport): async def request_is_limited(self) -> bool: if self.client and self.key and self.limit: - t: int = int(self.client.time()[0]) # type: ignore + time = await self.client.time() # type: ignore + t: int = int(time[0]) # type: ignore separation = round(60 / self.limit) value = await self.client.get(self.key) or t