Skip to content

Commit adbcd0e

Browse files
Change extensions type (#2803)
* Change extensions type * Update changelog * install httpcore from the git * Revert "install httpcore from the git" This reverts commit 1813c6a. * bump httpcore version * fix requirements --------- Co-authored-by: Tom Christie <[email protected]>
1 parent e874351 commit adbcd0e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1212

1313
### Added
1414

15+
* Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#2803)
1516
* Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)
1617
* The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. (#2776)
1718

httpx/_types.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
Iterator,
1717
List,
1818
Mapping,
19+
MutableMapping,
1920
NamedTuple,
2021
Optional,
2122
Sequence,
@@ -87,7 +88,7 @@
8788

8889
RequestContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
8990
ResponseContent = Union[str, bytes, Iterable[bytes], AsyncIterable[bytes]]
90-
ResponseExtensions = Mapping[str, Any]
91+
ResponseExtensions = MutableMapping[str, Any]
9192

9293
RequestData = Mapping[str, Any]
9394

@@ -104,7 +105,7 @@
104105
]
105106
RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]]
106107

107-
RequestExtensions = Mapping[str, Any]
108+
RequestExtensions = MutableMapping[str, Any]
108109

109110

110111
class SyncByteStream:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ classifiers = [
2828
]
2929
dependencies = [
3030
"certifi",
31-
"httpcore>=0.17.2,<0.18.0",
31+
"httpcore>=0.18.0,<0.19.0",
3232
"idna",
3333
"sniffio",
3434
]

0 commit comments

Comments
 (0)