From 23fc2cf29e9f49913e582167f945193e69d2a136 Mon Sep 17 00:00:00 2001 From: karosis88 Date: Tue, 1 Aug 2023 15:46:44 +0300 Subject: [PATCH 1/6] Change extensions type --- httpx/_types.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/httpx/_types.py b/httpx/_types.py index 6b610e1408..83cf35a32a 100644 --- a/httpx/_types.py +++ b/httpx/_types.py @@ -16,6 +16,7 @@ Iterator, List, Mapping, + MutableMapping, NamedTuple, Optional, Sequence, @@ -87,7 +88,7 @@ RequestContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]] ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]] -ResponseExtensions = Mapping[str, Any] +ResponseExtensions = MutableMapping[str, Any] RequestData = Mapping[str, Any] @@ -104,7 +105,7 @@ ] RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]] -RequestExtensions = Mapping[str, Any] +RequestExtensions = MutableMapping[str, Any] class SyncByteStream: From 26ac893e9bc1e6473b426ce301425ae6024dee66 Mon Sep 17 00:00:00 2001 From: karosis88 Date: Tue, 1 Aug 2023 15:48:15 +0300 Subject: [PATCH 2/6] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4942c9c9a5..82d0887d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added +* Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#2803) * Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716) ### Fixed From 1813c6aff178cce3b63d7458ec9a8337542de9dd Mon Sep 17 00:00:00 2001 From: karosis88 Date: Tue, 1 Aug 2023 16:14:28 +0300 Subject: [PATCH 3/6] install httpcore from the git --- pyproject.toml | 1 - requirements.txt | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 30228c120e..ceb664f19d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ classifiers = [ ] dependencies = [ "certifi", - "httpcore>=0.17.2,<0.18.0", "idna", "sniffio", ] diff --git a/requirements.txt b/requirements.txt index bd53167bb7..c5bfe7a90e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,3 +30,5 @@ trio==0.22.0 trio-typing==0.8.0 trustme==1.0.0 uvicorn==0.22.0 + +httpcore @ git+https://github.com/encode/httpcore@master \ No newline at end of file From f6080188c811361c91fe90ce08742015ea28d77c Mon Sep 17 00:00:00 2001 From: karosis88 Date: Tue, 1 Aug 2023 16:17:44 +0300 Subject: [PATCH 4/6] Revert "install httpcore from the git" This reverts commit 1813c6aff178cce3b63d7458ec9a8337542de9dd. --- pyproject.toml | 1 + requirements.txt | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ceb664f19d..30228c120e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ classifiers = [ ] dependencies = [ "certifi", + "httpcore>=0.17.2,<0.18.0", "idna", "sniffio", ] diff --git a/requirements.txt b/requirements.txt index c5bfe7a90e..bd53167bb7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,5 +30,3 @@ trio==0.22.0 trio-typing==0.8.0 trustme==1.0.0 uvicorn==0.22.0 - -httpcore @ git+https://github.com/encode/httpcore@master \ No newline at end of file From 27aa3ed09a580d69b727a9a234744452cf36eaa4 Mon Sep 17 00:00:00 2001 From: karosis88 Date: Fri, 8 Sep 2023 14:32:30 -0400 Subject: [PATCH 5/6] bump httpcore version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index acd41baf3a..0edfbd8659 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ ] dependencies = [ "certifi", - "httpcore>=0.17.2,<0.18.0", + "httpcore>=0.18.0<0.19.0", "idna", "sniffio", ] From 73e76742c4cf8fcb126a04ee376071600be6b155 Mon Sep 17 00:00:00 2001 From: karosis88 Date: Fri, 8 Sep 2023 14:35:06 -0400 Subject: [PATCH 6/6] fix requirements --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0edfbd8659..753e671ebc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ ] dependencies = [ "certifi", - "httpcore>=0.18.0<0.19.0", + "httpcore>=0.18.0,<0.19.0", "idna", "sniffio", ]