From 0e2361dbf319b4adea11a13502d3ab3bf3a6ebd6 Mon Sep 17 00:00:00 2001 From: Bakyt Niiazaliev Date: Fri, 13 Jun 2025 20:36:40 +0700 Subject: [PATCH] fix: change QueryParams constructor from __init__ to __new__ for proper instantiation --- python/httpx/_httpx/__init__.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/httpx/_httpx/__init__.pyi b/python/httpx/_httpx/__init__.pyi index 1f2082a0..bae19238 100644 --- a/python/httpx/_httpx/__init__.pyi +++ b/python/httpx/_httpx/__init__.pyi @@ -13,7 +13,7 @@ QueryParamTypes = typing.Union[ @typing.final class QueryParams(typing.Mapping[str, str]): - def __init__(self, *args: QueryParamTypes | None, **kwargs: typing.Any) -> None:... + def __new__(cls, *args: QueryParamTypes | None, **kwargs: typing.Any) -> None:... def keys(self) -> typing.KeysView[str]: """ Return all the keys in the query params.