From 45af5e247c1f818acf10643ffe08719e6134e5c4 Mon Sep 17 00:00:00 2001 From: Miwory Date: Tue, 28 Oct 2025 14:51:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/aiohttpx/__init__.py | 2 +- src/aiohttpx/client.py | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7fbc9b5..8cb774c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aiohttpx" -version = "1.0.0" +version = "1.1.0" description = "Custom HTTPX client with aiohttp transport, rate limiter and caching" readme = "README.md" authors = [ diff --git a/src/aiohttpx/__init__.py b/src/aiohttpx/__init__.py index 7f98504..2bdaa81 100644 --- a/src/aiohttpx/__init__.py +++ b/src/aiohttpx/__init__.py @@ -1 +1 @@ -__version__: str = '1.0.0' +__version__: str = '1.1.0' diff --git a/src/aiohttpx/client.py b/src/aiohttpx/client.py index 66f0bf2..2d2dce5 100644 --- a/src/aiohttpx/client.py +++ b/src/aiohttpx/client.py @@ -1,7 +1,7 @@ from collections.abc import Callable, Mapping from logging import getLogger from ssl import SSLContext -from typing import Any +from typing import Any, TypeVar from httpx import URL, Limits from httpx import AsyncClient as AsyncHTTPXClient @@ -10,6 +10,8 @@ from httpx import _types as t # type: ignore from aiohttpx.transports.cache import AsyncCacheTransport +K = TypeVar('K') + class AioHTTPXClient(AsyncHTTPXClient): def __init__( @@ -59,5 +61,8 @@ class AioHTTPXClient(AsyncHTTPXClient): self.logger = getLogger(logger) + def clean_dict[K, V](self, params: dict[K, Any | None]): + return {k: v for k, v in params.items() if v is not None} + __all__ = ['AioHTTPXClient']