]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Change extensions type (#2803)
authorKar Petrosyan <92274156+karosis88@users.noreply.github.com>
Mon, 11 Sep 2023 06:29:22 +0000 (02:29 -0400)
committerGitHub <noreply@github.com>
Mon, 11 Sep 2023 06:29:22 +0000 (09:29 +0300)
* Change extensions type

* Update changelog

* install httpcore from the git

* Revert "install httpcore from the git"

This reverts commit 1813c6aff178cce3b63d7458ec9a8337542de9dd.

* bump httpcore version

* fix requirements

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
CHANGELOG.md
httpx/_types.py
pyproject.toml

index a4f49c45d157e0e54cc8bbae7bfa34fa5a996ab7..6fc53394a7c133d5678d93a16fed72317c1a53f3 100644 (file)
@@ -12,6 +12,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)
 * The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. (#2776)
 
index 6b610e14084b8a94f2fbad725a8885c2cf62fad8..83cf35a32a4e9e40ae5482d898b40df8d8641d87 100644 (file)
@@ -16,6 +16,7 @@ from typing import (
     Iterator,
     List,
     Mapping,
+    MutableMapping,
     NamedTuple,
     Optional,
     Sequence,
@@ -87,7 +88,7 @@ AuthTypes = Union[
 
 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 @@ FileTypes = Union[
 ]
 RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]]
 
-RequestExtensions = Mapping[str, Any]
+RequestExtensions = MutableMapping[str, Any]
 
 
 class SyncByteStream:
index acd41baf3ac2322c5ecbf30cef846e0fea5b9b39..753e671ebc37f32579ebeb510a083cd52dee4a60 100644 (file)
@@ -28,7 +28,7 @@ classifiers = [
 ]
 dependencies = [
     "certifi",
-    "httpcore>=0.17.2,<0.18.0",
+    "httpcore>=0.18.0,<0.19.0",
     "idna",
     "sniffio",
 ]